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 TypeMethodDescriptionvoid
appInBackground
(Context context) Notifies the SDK that the app is in the background.void
appInForeground
(Context context) Notifies the SDK that the app is in the foreground.void
end()
Ends the current session.void
loadMetadata
(JSONObject jsonMetadata) Loads metadata for the current stream.void
play
(JSONObject channelInfo) Starts playback.void
Sends ID3 tags.void
setPlayheadPosition
(long position) Sets the current playhead position.void
stop()
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.
-