Skip navigation links

Package de.spring.mobile

API Documentation for the Kantar Media Audience Measurement Library for Android.

See: Description

Package de.spring.mobile Description

API Documentation for the Kantar Media Audience Measurement Library for Android.

Kantar Media Android Audience Sensor

Kantar Media Audience Measurement Library for Android

Kantar Media Audience library User Manual

From now on, the Kantar Media Android release will be in aar format instead of jar, which contains all the necessary dependencies required. Please insert the dependency into the project: compile(name:'spring-appsensor-android-*', ext:'aar'). Please notice, if you have both Kantar Media Tagging and Streaming library in the project, the duplicated dependencies should be removed from the aar file. Please simply unzip the Kantar Media streaming aar file, empty the 'libs' folder, then arr(zip) the folder again and inmport both libraries in.

Beginning with kantarmedia-tagging-SDK-1.11.0, A new identifier kid is added to measurement. This along with other identifiers will help to identify the android device.

Beginning with Kantar Media lib 1.6.0, GoogleAdvertisingID is adapted to identify the android devices. In order to achieve this, please import google-play-services_lib to your application. Follow the tutorial detailed info: http://developer.android.com/google/play-services/setup.html
  • Install the Google Play Services SDK.
  • Import the project into your application.
  • Don't forget to add following items into your project AndroidManifest.xml file:
  • <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
    <uses-permission android:name="com.google.android.gms.permission.AD_ID" />

The Kantar Media android sensor has feature so called "offlineMode". This mode can be switched on and off by using public API: setOfflineMode(boolean offlineMode)

If the lib is configured to offlineMode, Kantar Media library would hold all requests in a local buffer and send them when the device goes back online. Kantar Media library checks the Internet connection regularly by using the Android Timer and send the data as soon as possible. Please notice:
  • Old requests will be dropped if too many requests pump into local buffer for the limitation in buffer size. The default buffer size is 500. The data will be stored in a local file, so the lib will not lose the requests even if the application terminates.
  • Kantar Media library tries to send the requests in a fixed rate, 10 seconds by default, and sends them if device is online.

In order to use Kantar Media library, please give/add the permissions to your android application by modifying the AndroidManifest.xml:

    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    

Please Note: Some components in Kantar Media library are running in background threads. Please keep the initialization and usage of Kantar Media library in your main UI thread, then Kantar Media library will not block your GUI display

Please Note: Only one Spring object is enough for the project, please initialize the Kantar Media library once in the whole project.

Please Note: Please initialize the KMA library before sending any url connection, because the CookieHandler will be overwritten along with the KMA lib initialization.

Please Note: If you are using ProGuard, our library could be compromised. Therefore it is necessary to add the following lines into the ProGuard configuration file:

# Keep Kantar Media files
-keep class de.spring.** { *; }


# Keep apache files (only needed in tagging version <= 1.7.6)
-keep class org.apache.** { *; }


Please paste below lines in ProGuard configuration in order to prevent warnings related to android webView or webViewClient
-dontwarn android.webkit.WebView
-dontwarn android.webkit.WebViewClient


Beginning with the Kantar Media Tagging Library 1.8.3, the Android-ID transmission method to existing panel registration apps (e.g. Vitualmeter) will be changed. To have the permission to send Android ID information to the Virtualmeter app, the following tags must be added to the AndroidManifest.xml of any app, which uses the sensor:

<uses-permission android:name="com.kantarmedia.tns.no.virtualmeter.WRITE_DATABASE" />
<queries>
<provider android:authorities="tns.no.droid.AIDProvider" />
</queries>

Release Notes

Version 1.13.0

Change

Attribute

Description

Google Play Store security warnings Improvement

AES/GCM/NoPadding encryption mode is supported back within the security mechanisms.

Disguising of the Secret Key Improvement

Secret Key for the security mechanisms is not visible within the source code after the decompilation process gets performed.

Application crashes on the Amazon devices Bug Fix

Crashes of the specific applications on the Amazon devices are eliminated.

Android 13 Platform Review

Support for Android 13 platforms is added.

Version 1.12.1

Change

Attribute

Description

Google Play Store security warnings Improvement

AES/ECB mode temporarily supported back within the security mechanisms.

Version 1.12.0

Change

Attribute

Description

Google Play Store security warnings Improvement

Security mechanisms enhanced to eliminate the Google Play Store submission issues.

Measurement systems absence Bug Fix

Crashes for specific apps in case of the absence of the Measurement systems are eliminated.

Android 12 Platform Review

Support for Android 12 platforms is added.

Version 1.11.0

Change

Attribute

Description

c-parameter Improvement

c-parameter is added to the request as a fallback for missing cookie.

kid Improvement

A new identifier kid is now added to the measurement.

Version 1.10.0

Change

Attribute

Description

Device ID

Bug fix

Apps targeting API 29 and higher will not crash on did retrieval

Android 11

Platform Review

SDK's now will support android 11

WebView

Improvement

Using WebSettings to collect the value of User-Agent whenever possible instead of creating new WebView instance.

SSL

Improvement

Removing offloader. Box will now take care of all ssl requests.

Cookie Store

Improvement

Cookie Store will now persist only the ‘i00’ named cookie. Couple of defects related to the logic of storing the cookies have been fixed.

Version 1.9.1

Change

Attribute

Description

Device ID

Improvement

SDK now checks for DID before sending first request

Webview(Panel Version only)

Enhancement

SDK now removes webview dependency only for panel version to support their requirement

Version 1.9.0

Multi Market Improvement

Sensor now provides a new constructor enables user to configure domain using the new parameter in constructor. Currently we accept only "DK","NO" & "UK" as parameters Remaining are not supported at this time.

Version 1.8.4

Change Attribute Description
Payload elements Improvement

Additional variables for the operating system ("os") and the app version ("av") have been added.

Android P Test

Review of sensor on Android P.

Version 1.8.3

Change Attribute Description
Android ID Improvement

Send hashed Android ID to VirtualMeter app on sensor start (if installed).

Ringbuffer Bugfix

Fixes an exception, which occurs if objects from older versions are still persisted in the ring buffer.

Version 1.8.2

Change Attribute Description
Cookie Handling Improvement

Handling of cookie lifetime period improved.

Identifier Retrieval Improvement

The new public method (getEncryptedIdentifiers) can be used to get the mobile identifiers in a map object.

RingBuffer Improvement

Ringbuffer now flushes all requests when the app goes into background.

Naming Convention Improvement

The naming of the sensor delivery files was outdated due to integration of spring as company into the Kantar Media organization.

Version 1.8.1

Change Attribute Description
Apache HTTP Client Improvement

The Apache HTTP Client Jar has been removed, because its not longer needed.

Version 1.8.0

Change Attribute Description
Debug mode Improvement

Debug mode will be forced to false if the application is installed from Google Play Store, otherwise Debug mode can be set to true. If the debug set to true, the KMA library will automatic add a flag "isDebug=1" in the http request.

Request Debugger Improvement

A request debugger (Observable) is added into the project, can only be activated if debug mode is on. For more info see setDebuggerObserver(Observer observer), removeDebuggerObservers(), removeDebuggerObserver(Observer observer). Please have your own implementation with Observer, and call setDebuggerObserver(Observer observer) to start tracking on the KMA Http Requests. The object return from observable is a Hashmap, with key "Statuscode" and "Request", values are strings.

Empty IDs Improvement

The empty IDs are removed from KMA measurement requests, only valid IDs will be sent.

Apache HttpClient Library Improvement

The third-party Apache library is now removed from KMA libraries, only Android APIs in library.

Version 1.7.6

Change Attribute Description
Inapp Improvement

Product Name is now an public API in QSIClient, only affact oewa users.

Http Communication Improvement

As the statement in Android security policy, no http requests will be allowed anymore, KMA library will adapt https for the communication.

Version 1.7.5

Change Attribute Description
Inapp Improvement

OWASurveySession.startSession() is removed from the SpringMobileSurvey constructor.

Inapp Improvement

Oewa Inapp lib version(version in lib) is not with A as the prefix.

Version 1.7.4

Change Attribute Description
Apache legacy jar Improvement

Apache Legacy HTTP Jar file is enclosed.

READ_PHONE_STATUS Permission Improvement

The Permission requirements are reduced, Kantar Media library will not support Device ID any more.

Version 1.7.2

Change Attribute Description
Survey services Improvement

Starting from the version 1.7.2, Kantar Media library has an extension, called SurveySpring, which offers you the opportunity to achieve the on-line questionary with the end users. The SurveySpring is not default embedded into the library, if you need more info, please contact support@spring.de, survey service can be attached on demands

Debug Mode Improvement

Default debug setting is configured to false, only error message will present in the log if Kantar Media library debug mode is not set to true on purpose.

Version 1.7.0

Change Attribute Description
User-agent String Improvement

Start with Kantar Media library 1.7.0, the intact user-agent string of the device is inserted into http client parameters to be collected by the backend box. The intact user-agent string contains the keyword "mobile" in it, and can be used to detect the device type.

Background thread conflict Bug fix

Fix the bug caused by threads conflict, this bug only happens in low android versions(earlier than 4.0.4).

App name retrieving Improvement

Kantar Media libraries are more tolerant when try to read application name, and will not crash the application.

Google Advertising ID Improvement

Delay in sending the request until Google Advertising ID is successfully retrieved.

Skip navigation links