Category

Android SDK API Reference: Difference between revisions

From Engineering Client Portal

(Created page with "{{Breadcrumb|}} {{Breadcrumb|Digital}} {{CurrentBreadcrumb}} Category:Digital The Nielsen App SDK (located in the ''com.nielsen.app.sdk'' package) class is the primary app...")
 
No edit summary
Line 4: Line 4:
*Create and initialize an instance object of <code>AppSdk</code> class.
*Create and initialize an instance object of <code>AppSdk</code> class.
*The player application can use this object to collect HLS timed metadata through a [[sendID3()]] call.
*The player application can use this object to collect HLS timed metadata through a [[sendID3()]] call.
The Nielsen App SDK class is defined as the only public class belonging to the com.nielsen.app.sdk package. It inherits from the closeable interface and exposes the public APIs the client’s app will use. Below is the declaration of the <code>AppSdk</code> class: </code>public class AppSdk implements Closeable</code>
The Nielsen App SDK class is defined as the only public class belonging to the com.nielsen.app.sdk package. It inherits from the closeable interface and exposes the public APIs the client’s app will use. Below is the declaration of the <code>AppSdk</code> class: <code>public class AppSdk implements Closeable</code>


== IOS SDK API Methods & Properties ==
== IOS SDK API Methods & Properties ==

Revision as of 07:26, 21 May 2017

Engineering Portal / Digital / Android SDK API Reference
The Nielsen App SDK (located in the com.nielsen.app.sdk package) class is the primary application interface to the Nielsen App SDK on Android.

  • Create and initialize an instance object of AppSdk class.
  • The player application can use this object to collect HLS timed metadata through a sendID3() call.

The Nielsen App SDK class is defined as the only public class belonging to the com.nielsen.app.sdk package. It inherits from the closeable interface and exposes the public APIs the client’s app will use. Below is the declaration of the AppSdk class: public class AppSdk implements Closeable

IOS SDK API Methods & Properties

Scenario Method / Property DTVR DAR Digital Audio DCR International (Germany) Description
Initialize AppSDK() Used to create a new instance of the SDK object
Measurement play() Used when there is an ID3 fed product such as DTVR and the client does not want to send in all the CMS metadata that is sent in loadMetadata. This allows the client to send in at least the required “channel name” value associated to the ID3 feed. If this is not called then the “channel name” value populated will be the default value of “defaultChannelName”.
Measurement loadMetadata() Used when there is a preroll ad that needs to be associated with content metadata. The loadmetadata will first be called to populate the content metadata values and then the loadMetadata for ad metadata will be called. This allows sending a content ping with the ad info, even if the user bails out during the preroll ad.
Measurement sendID3() Used to send the ID3 metadata.
Measurement setPlayheadPosition() Used to send the playhead position.
Measurement stop() Used when playback is paused and when switching between ad and content or content and ad.
Measurement end() Used when content playback is complete. This is triggered 1) at the end of the content stream, 2) if the user switches to another piece of content
Measurement updateOTT() Used to notify App SDK that the remote OTT device (like Google ChromeCast, Roku, Amazon FireTV, etc.) is connected / disconnected (change of OTT status).
Opt-out userOptOutURLString() Used to fetch the Nielsen opt-out web page URL.
Opt-out userOptOut() Used to supply the response message from opt-out webpage to the SDK.
Opt-out getOptOutStatus() Call this API to retrieve the Opt-Out or Opt-In state.
Opt-out appDisableApi()

(kill switch)

Used to disable the SDK.
Opt-out getAppDisable() Used to query if the SDK is disabled or not.
Log getLastEvent() Used to query the SDK for the last status
Log getLastError() Used to query the SDK for the last error
Log isValid() Used to check if the SDK was successfully instantiated or not.
Log getMeterVersion() Returns the current SDK version.
Log getNielsenId() Used to get a string defining the Nielsen ID (NUID) number for the device.
Log getDeviceId() Returns the current device id.
Log appInBackground() Used to capture the event of app going to background.
Log setDebug() Used to enable/disable debug flags. Newly introduced in SDK version 5.0.0 for International (Germany)