Package com.castlabs.sdk.nielsen
Interface NielsenComponent.AppSdk
- Enclosing interface:
NielsenComponent
public static interface NielsenComponent.AppSdk
Wrapper around Nielsen AppSdk API
-
Method Summary
Modifier and TypeMethodDescriptionvoidappInBackground(Context context) Notifies the SDK that the app is in the background.voidappInForeground(Context context) Notifies the SDK that the app is in the foreground.voidend()Ends the current session.voidloadMetadata(JSONObject jsonMetadata) Loads metadata for the current stream.voidplay(JSONObject channelInfo) Starts playback.voidSends ID3 tags.voidsetPlayheadPosition(long position) Sets the current playhead position.voidstop()Stops playback.
-
Method Details
-
loadMetadata
Loads metadata for the current stream.- Parameters:
jsonMetadata- The metadata to load.
-
setPlayheadPosition
void setPlayheadPosition(long position) Sets the current playhead position.- Parameters:
position- The current playhead position.
-
sendID3
Sends ID3 tags.- Parameters:
payload- The ID3 payload.
-
play
Starts playback.- Parameters:
channelInfo- Information about the channel being played.
-
stop
void stop()Stops playback. -
end
void end()Ends the current session. -
appInForeground
Notifies the SDK that the app is in the foreground.- Parameters:
context- The application context.
-
appInBackground
Notifies the SDK that the app is in the background.- Parameters:
context- The application context.
-