flutter_infonline_library 0.9.2
flutter_infonline_library: ^0.9.2 copied to clipboard
Unoffical INFOnline Flutter Library.
Unoffical INFOnline Flutter Library #
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)
Requirements #
- Dart sdk:
>=2.17.6 <3.0.0 - Flutter:
>=2.5.0 - Android:
minSdkVersion 19 - iOS:
minSdkVersion 11
Configuration #
Add flutter_infonline_library as a dependency in your pubspec.yaml file.
iOS #
Open ios/Podfile in your project. Make sure platform is uncommented with minimum version 11.
platform :ios, '11.0'
Open XCode and add a new Run Script in "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
Android #
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
}
}
Usage #
Simple example to test the plugin in your project.
Example #
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 event
await InfonlineLibrary.instance.session(IOLSessionType.szm).logEvent(
type: IOLViewEventType.appeared,
category: 'aktionaer/watchlist'
);
}
Supported functions #
Shared for all platforms #
InfonlineLibrary.instance.session(IOLSessionType.szm).logEvent(
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.
iOS specified #
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.
Android specified #
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.