Android SDK API Table

From Engineering Client Portal

Android SDK API Methods & Properties Table

Scenario Method / Property DTVR DAR 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 staticEnd() Used with DCR Static duration in between loadMetadata calls for static content when section name is the same but a new static view event and duration measurement restart is desired
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 appInForeground() Used to capture the event of app coming to foreground
Log setDebug() Used to enable/disable debug flags. Newly introduced in SDK version 5.0.0 for International (Germany)
Viewability
Audibility
trackViewability() Used to start the viewability measurement.