Giter Site home page Giter Site logo

kevinhaendel / flutter_iomb_library Goto Github PK

View Code? Open in Web Editor NEW

This project forked from frankteller-de/flutter_iomb_library

0.0 0.0 0.0 338 KB

INFOnline Flutter Library Android/iOS (Zensus Messung IOMb)

License: MIT License

Ruby 15.26% Objective-C 4.48% Kotlin 20.24% Dart 40.32% Swift 19.69%

flutter_iomb_library's Introduction

Unoffical IOMb Flutter Library

Pub Build Status License package publisher Awesome Flutter

Library for census measurements

The IOMb Flutter Library supports the IOMb/Census (IOMb Library iOS/Android) measurement system.

If you are interested in pseudonym measurements look at flutter_infonline_library:

  • IOMp/SZM (INFOnline Library iOS/Android)
  • ÖWA (INFOnline Library iOS/Android)

Requirements

  • Dart sdk: >=2.17.6 <4.0.0
  • Flutter: >=2.5.0
  • Android: minSdkVersion 19
  • iOS: minSdkVersion 12
  • 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!

Configuration

Add flutter_iomb_library as a dependency in your pubspec.yaml file.

iOS

Open ios/Podfile in your project. Make sure platform is uncommented and has a minimum version of 11.

platform :ios, '12.0'

Also in Podfile add pod package under use_frameworks.

target 'Runner' do
  use_frameworks!
  pod 'IOMbLibrary', :git => 'https://<user>:<pass>@repo.infonline.de/iom/base/sensors/app/ios.git'
end

Android

Now open the android/app/build.gradle file and make sure your SDK version is >= 19.

android {
  defaultConfig {
    minSdkVersion 26
    targetSdkVersion 33
  }
}

Open the android/build.gradle and add the maven source.

allprojects {
  repositories {
  maven {
    url "https://repo.infonline.de/api/v4/projects/5/packages/maven"
    name "INFOnline"

    credentials(HttpHeaderCredentials) {
      name = "Private-Token"
      value = '[DEVELOPER-ACCESS-TOKEN]'
    }
    authentication {
      header(HttpHeaderAuthentication)
    }
  }
}

Usage

Simple example to test the plugin in your project.

Example

import 'package:flutter_iomb_library/flutter_iomb_library.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await IombLibrary.instance.android.setDebugModeEnabled(true);
  await IombLibrary.instance.ios.setDebugLogLevel(IOMBDebugLevel.trace);

  await IombLibrary.instance.sessionConfiguration(
    baseURL: Platform.isAndroid ? '<yourAndroidBaseURL>' : '<yourIosBaseURL>',
    offerIdentifier: Platform.isAndroid ? '<AndroidIdentifier>' : '<iOSIdentifier>',
  );

  await IombLibrary.instance.logViewEvent(
    type: IOMBViewEvent.appeared,
    category: '<yourCategory>'
  );
}

Supported functions

Shared for all platforms

IombLibrary.instance.sessionConfiguration(
	baseURL: '<yourBaseURL>',
	offerIdentifier: '<yourIdentifier>',
);

IombLibrary.instance.logViewEvent(type: IOMBViewEvent.appeared, category: '<category>');

IombLibrary.instance.terminateSession();

For more informations look at the offical iOS and Android documentation.

iOS specified

IombLibrary.instance.ios.setDebugLogLevel(IOMBDebugLevel.trace);

For more informations look at the offical iOS documentation.

Android specified

IombLibrary.instance.android.setDebugModeEnabled(true);

For more informations look at the offical Android documentation.

flutter_iomb_library's People

Contributors

frankteller-de avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.