Digital Audio SDK Updates

From Engineering Client Portal

This page provides instructions on updating to the latest SDK version for Digital Audio. Instructions are in sections for the version you are updating from.

General Steps

  1. Download the SDK bundles here: SDK Downloads
  2. Extract the zipped library and replace the previous Nielsen App SDK library with this SDK library
  3. Perform the code changes below if the version you are replacing is older than 5.1.1
  4. Before deployment, send your updated application to your Nielsen TAM for testing.


From SDK Change Description
IOS and Android SDK ver 4.0 and earlier Code changes are required. Please see Upgrade Instructions below for the required code changes. You must also perform the Opt Out Process update (below.)
IOS SDK version 4.0 - 5.1.0 Change the optOutURL procedures. Please see the instructions for Updating the Opt Out Process below for the required code changes.
IOS and Android SDK 5.1.1 and later There are no code changes required. You simply need to use the new library and submit your app to Nielsen for (re)certification.

Upgrading from SDK 4.0 and Earlier

iOS

A. For iOS, you will need to ensure that AVFoundation framework classes are available because the latest SDK version depends on AVFoundation.
B. Make two changes to the SDK’s initialization: 1) Replace the usage of sharedInstance and 2) use a JSON dictionary instead of a JSON string:

Example of old code [DO NOT USE]:

NSDictionary* appInformation = @{
            @"appid": @"P99999999-AAAA-46BD-86BB-D848CA90881B",
            @"appversion": @"1.0.6",
            @"appname": @"Global Media WWWW-FM",
            @"sfcode": @"drm"
            };
NSData* jsonDataAppInfo = [NSJSONSerialization dataWithJSONObject:appInformation options:0 error:nil];
NSString* jsonStringAppInfo = [[NSString alloc] initWithBytes:[jsonDataAppInfo bytes] length:[jsonDataAppInfo length] encoding:NSUTF8StringEncoding];
nlsAppApiMeter = [[NielsenAppApi sharedInstance] initWithAppInfo:jsonStringAppInfo];


Example of new code:

NSDictionary* appInformation = @{
            @"appid": @"P99999999-AAAA-46BD-86BB-D848CA90881B",
            @"appversion": @"1.0.6",
            @"appname": @"Global Media WWWW-FM",
            @"sfcode": @"drm"
            };
nlsAppApiMeter = [[NielsenAppApi alloc]] initWithAppInfo:appInformation delegate:self];


C. Update all API calls to pass a JSON dictionary instead of a JSON string. Please refer to the Developer Guide for specific instructions for each call: Digital Audio iOS SDK
D. You must also update the Opt Out Process as noted here: Opt Out Process in IOS SDK Versions 4.0 to 5.1.0
E. FOR TESTING and certification – To enable SDK logging, pass “INFO” or “DEBUG” to nol_devDebug during initialization. Do not use the debugging feature in the production version of your app. To turn debugging off, do not pass the nol_devDebug parameter.


Android

A. Remove any instances of libAppSdk.so in your libraries.
B. Update the SDK’s initialization by replacing getInstance(). An example of the old and new code is below.

Old code example [DO NOT USE]:

AppSdk mAppSdk = AppSdk.getInstance(context, config, iappNotifier);


Example of new code:

AppSdk mAppSdk = new AppSdk(context, config, iappNotifier);


C. All of the commonly used APIs now return type void rather than AppSDK. Remove any code that checks the return code from an API. Nielsen SDK APIs that exchange runtime parameters will still return their signature value.
D. Because the AppSdk is no longer singleton, you must use your specific AppSdk instance to call APIs.
E. For all APIs, pass parameters as JSON objects instead of strings.

Old code example [DO NOT USE]:

String config = {+ “”appid     					                  // and so on


Example of new code :

JSONObject appSdkConfig = new JSONObject()
          .put(appid, P99999999-AAAA-46BD-86BB-D848CA90881B)      // and so on


F. FOR TESTING and certification
  • If the test version of your app uses nol_devDebug for logging, replace the “true” value with “DEBUG”,”WARNING”,”INFO” or “ERROR”.
  • Do not use the debugging feature in the production version of your app.
  • To turn debugging off, do not pass the nol_devDebug parameter.

Additional Update for IOS SDK Versions 4.0 to 5.1.0

Updating the Opt Out Process

A. Retrieve the Nielsen Privacy Page URL from a property of the SDK object instead of from the optOutURLString field. The optOutURLString field was deprecated starting with Nielsen App SDK version 5.1.0.4.

Example of old code [DO NOT USE]:

nlsAppApiMeter = [[NielsenAppApi sharedInstance] initWithAppInfo:jsonStringAppInfo];
...
NSString *webAddress = [nlsAppApiMeter optOutURLString];


Example of new code:

nlsAppApiMeter = [[NielsenAppApi alloc]] initWithAppInfo:appInformation delegate:self];
...
self.webAddress = nlsAppApiMeter.optOutURL;

Please note: for Limit Ad Tracking

B. Your app should continue to pass the user’s selection back to the SDK without change.
  • For IOS versions with Limit Ad Tracking, the SDK provides the URL of a page without the opt-out/opt-in links; however, your app should continue to pass the user selection.
  • The Nielsen SDK uses the IOS Limit Ad Tracking settings to determine user opt-out status. The SDK will handle the logic to ignore the selection when appropriate.
  • The result is that your app will handle user selections in OS versions with and without Limit Ad Tracking the same way (no update).