Library for pseudonym measurements
The INFOnline Flutter Library supports parallel operation of sessions of the following measurement systems:
- IOMp/SZM (INFOnline Library iOS/Android)
- ÖWA (INFOnline Library iOS/Android)
If you are interested in census measurements look at flutter_iomb_library:
- IOMb/Census (IOMb Library iOS/Android)
- Dart sdk:
>=2.17.6 <3.0.0
- Flutter:
>=2.5.0
- Android:
minSdkVersion 19
- iOS:
minSdkVersion 11
- native iOS and Android INFOnline libraries
You will get the native iOS and Android libraries via email from INFOnline Support. The native libraries are not public!
Add flutter_infonline_library
as a dependency in your pubspec.yaml file.
Open ios/Podfile
in your project. Make sure platform is uncommented and has a minimum version of 11.
platform :ios, '11.0'
Open XCode and add a new Run Script under "Bild Phases".
$PROJECT_DIR/INFOnlineLibrary/copy-framework.sh
Finally, download the iOS INFOnline library and copy the source folder to your iOS project folder.
ios/INFOnlineLibrary
Download the Android INFOnline library and copy the *.aar file into the follow folder in your project.
android/app/libs/infonlinelib_2.3.1.aar
Now open the android/app/build.gradle
file and make sure your SDK version is >= 19.
android {
defaultConfig {
minSdkVersion 26
targetSdkVersion 30
}
}
Add your Ad Manager app ID (identified in the Ad Manager UI) to your app's AndroidManifest.xml file.
<manifest>
<application>
<!-- Sample Ad Manager app ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
</application>
</manifest>
Simple example to test the plugin in your project.
import 'package:flutter_infonline_library/flutter_infonline_library.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
if (Platform.isAndroid) {
// Enable logging, that will display in your IDE console.
await InfonlineLibrary.instance.android.setDebugModeEnabled(true);
// Create a new Android session
await InfonlineLibrary.instance.session(IOLSessionType.szm).android.initIOLSession(
offerIdentifier: '<yourIdentifier>', debug: true, type: IOLPrivacyType.ack
);
}
else if (Platform.isIOS) {
// Enable logging, that will only display in your XCode console.
await InfonlineLibrary.instance.ios.setDebugLogLevel(IOLDebugLevel.trace);
// Create a new iOS session
await InfonlineLibrary.instance.session(IOLSessionType.szm).ios.startSession(
offerIdentifier: '<yourIdentifier>', type: IOLPrivacyType.ack
);
}
// Log an view event
await InfonlineLibrary.instance.session(IOLSessionType.szm).logViewEvent(
type: IOLViewEventType.appeared,
category: '<yourCategory>'
);
}
InfonlineLibrary.instance.session(IOLSessionType.szm).logViewEvent(
type: IOLViewEventType.appeared,
category: '<yourCategory>'
);
InfonlineLibrary.instance.session(IOLSessionType.szm).sendLoggedEvents();
InfonlineLibrary.instance.session(IOLSessionType.szm).terminateSession();
InfonlineLibrary.instance.session(IOLSessionType.szm).setCustomConsent('<String>');
For more informations look at the offical iOS and Android documentation.
InfonlineLibrary.instance.ios.setDebugLogLevel(IOLDebugLevel.trace);
InfonlineLibrary.instance.session(IOLSessionType.szm).ios.startSession(
offerIdentifier: '<yourIdentifier>',
type: IOLPrivacyType.ack
);
List<String> logs = await InfonlineLibrary.instance.ios.mostRecentLogs(0);
For more informations look at the offical iOS documentation.
InfonlineLibrary.instance.android.setDebugModeEnabled(true);
InfonlineLibrary.instance.session(IOLSessionType.szm).android.initIOLSession(
offerIdentifier: '<yourIdentifier>',
debug: true,
type: IOLPrivacyType.ack
);
For more informations look at the offical Android documentation.