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 Type
  Method
  Description
  `void`
  `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`
  `sendID3(String payload)`
  Sends ID3 tags.
  `void`
  `setPlayheadPosition(long position)`
  Sets the current playhead position.
  `void`
  `stop()`
  Stops playback.

- ## Method Details

  - ### loadMetadata

    void loadMetadata(JSONObject jsonMetadata)
    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

    void sendID3(String payload)
    Sends ID3 tags.
    Parameters:
      `payload` - The ID3 payload.

  - ### play

    void play(JSONObject channelInfo)
    Starts playback.
    Parameters:
      `channelInfo` - Information about the channel being played.

  - ### stop

    void stop()
    Stops playback.

  - ### end

    void end()
    Ends the current session.

  - ### appInForeground

    void appInForeground(Context context)
    Notifies the SDK that the app is in the foreground.
    Parameters:
      `context` - The application context.

  - ### appInBackground

    void appInBackground(Context context)
    Notifies the SDK that the app is in the background.
    Parameters:
      `context` - The application context.