Android SDK (Core)

Guides & Tutorials

6min

The Guides & Tutorials section offers step-by-step instructions and practical examples for using the Android SDK.

Playback & Entity Management

This section will give an quick overview on how to control playback and handle entity (camera) changes.

The playback data can be accessed via NwCore. This example shows how to access the currentTime value of the playback by listening to the callback function in.

Triggering an entity (camera) change

The NwCore also provides a simple option to change the currently playing entity (camera).

Kotlin


If you want to retrieve available entities first to provide the user a selection option, you can get them like this:

Kotlin


To get the current selected entity, this can be done like this:

Swift


Getting Started with Second-Screen Sync

To get started with the second-screen sync, the recommended option is to use the directSync mode and try it with some VOD content.

To enable the direct sync to e.g. sync against a VOD event, you need to set the AudioSyncMode to AudioSyncMode.LIBRARY:

Kotlin


Additionally, you need to set a directSyncId, so the correct sync query is used:

Kotlin


The directSyncId is created when sync information is extracted for VOD events. A common setup is to send the directSyncId as part of event information like the programId.

The next step is to initialize the sync and passing your listener for callbacks:

Kotlin


After everything is initialized and ready to go, simply start the sync by calling:

Kotlin


You can get the sync result by listening to the onSyncOffsetFound callback, which contains the new offset identified by the sync:

Kotlin