Skip navigation links

Package de.spring.mobile

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

See: Description

Package de.spring.mobile Description

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

Kantar Media Android Streaming Sensor

Kantar Media Streaming Measurement Library for Android

Kantar Media Streaming 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-appstreaming-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-streaming-SDK-1.7.0, A new identifier kid is added to measurement. This along with other identifiers will help to identify the android device.

Beginning with the Kantar Media Streaming Library 1.1.0, GoogleAdvertisingID is adapted to identify the android devices. In order to achieve this, please import google-play-services_library 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 Streaming library has a new feature so called "offlineMode" beginning with version 1.0.0. This mode can be switched on and off by using public API: setOfflineMode(boolean offlineMode)

If the library 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 Streaming Measurement 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 library will not lose the requests even if the application terminates.
  • Kantar Media Streaming Measurement library tries to send the requests in a fixed rate, 10 seconds by default, and sends them if device is online.

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

Please Note: Please initialize the KMA library before sending any url connection, because the CookieHandler will be overwritten along with the KMA library 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 the files of the library
-keep class de.spring.** { *; }


# Keep apache files (only needed in streaming version <= 1.2.5)
-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

In order to measure videos, which are casted to a Chromecast device, the ChromeCastVideoViewAdapter has to be used or extended instead of the default VideoViewAdapter. The ChromeCastVideoViewAdapter automatically detects, if the video is played locally on the android device or if it is casted to a connected Chromecast device. To create a ChromeCastVideoViewAdapter, the constructor has to be called with a VideoView object and the CastContext instance, which is part of the Chromecast framework.


Beginning with the Kantar Media Streaming Library 1.3.1, 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.9.0

Change

Attribute

Description

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.8.2

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.

Universal Improvement

Market DK will not be supported inside SDK as a part of the multi-market measurement.

Application crashes on the Android TV platforms Bug Fix

Crashes of the specific applications on the Android TV platforms are eliminated.

Version 1.8.1

Change

Attribute

Description

Google Play Store security warnings Improvement

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

Version 1.8.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.7.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.6.1(Universal Only)

Change

Attribute

Description

Universal Improvement

New market FI will now be supported inside SDK as part of multi-market measurement

Version 1.6.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.

Version 1.5.2

Change

Attribute

Description

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.

WebView

Improvement

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

Version 1.5.1

Change Attribute Description
Syncrates Improvement

Sensor will now measure with improved syncrate accuracy

DID Improvement Sensor now checks for DID before sending first request
Timestamp Improvement Sensor now uses SystemClock.ElapsedRealtime() for all timestamp calculations

Version 1.5.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.4.0

UID Improvement

Sensor provides a new method, which returns the UID of the next created stream (BARB only).

Payload elements Improvement

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

ChromeCast Improvement

Add ChromeCast support to the Android sensor.

Logging Bugfix

Removal of unnecessary Log Messages.

Android P Test

Review of sensor on Android P.

Performance Improvement

Sensor creation now takes less time.

Version 1.3.1

Android ID Improvement

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

Scrubbing Improvement

Scrubbing now will not add more playstates to request.

Ringbuffer Bugfix

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

Version 1.3.0

Cookie Migration Improvement

Migrate cookies, which have been created by the replaced apache http client into the new cookie store.

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.

UID Improvement

Randomness of UID has been increased and UID is now accessable with an getter.

Naming Convention Improvement

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

Cookie Handling Improvement

Handling of cookie lifetime period improved

Version 1.2.5

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.

Singleton Improvement

The main class SpringStreams is now a singleton class. Now the only way to create an instance, is calling the new method getInstance().

Version 1.2.4

Change Attribute Description
Https 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.2.3

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 Streaming Measurement library will not support Device ID any more.

Version 1.2.2

Change Attribute Description
Http StatusCode Fix

Fix a related bug, Kantar Media Streaming Measurement library will not retrieve the http StatusCode when connection failed.

Version 1.2.1

Change Attribute Description
Debug Mode Improvement

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

Version 1.2.0

Change Attribute Description
User-agent String Improvement

Starting with Kantar Media Streaming library 1.2.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 Streaming Measurement 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.

Release Notes

Version 1.1.0

Change Attribute Description
getGoogleAdvertisingID Function As announced by Google, they are replacing androidID with the new GoogleAdvertisingID. As a response, Kantar Media Streaming library 1.1.0 will try to identify each single device by using GoogleAdvertisingID.
Customized special fields New Feature Customized parameters/special fields are inserted into measuring http-request, applied to our library correspondingly based on the different domains.
User Agent New feature User-Agent-String is applied to the http client parameters
getWidth() Bug fix Fix the bug in getWidth(). In previous versions, it always returns the height of the display window.
Identifier in console New feature The identifier of the device in plain text is printed to the console in debug mode

Version 1.0.0

Change Attribute Description
OfflineMode New function If the app is configured to offlineMode, Kantar Media library would hold all requests in a local buffer and send them until the device goes back online. Kantar Media Streaming library checks the Internet connection regularly by using a Timer and send the data as soon as possible. This mode can be switched on and off by using public API.
Method Stream.setDuration Remove The duration has to be delivered by the method StreamAdapter.getDuration.
Skip navigation links