Package com.castlabs.sdk.nielsen
Interface NielsenComponent
public interface NielsenComponent
This is a public interface that can be used to get access to the Nielsen AppSdk of a player
as a player controller component.
The Nielsen plugin registers itself as a component on the
PlayerController
and you can use PlayerController.getComponent(Class) with this
class to access the registered Instance. For example:
NielsenComponent nielsenComponent = playerController.getComponent(NielsenComponent.class);
AppSdk appSdk = nielsenComponent != null ? nielsenComponent.getAppSdk() : null;
if (appSdk != null) {
String optOutUrl = appSdk.userOptOutURLString();
}
- Since:
- 4.2.0
-
Method Summary
Modifier and TypeMethodDescriptioncom.nielsen.app.sdk.AppSdkReturns the Nielsen AppSdk of the player.
-
Method Details
-
getAppSdk
@Nullable com.nielsen.app.sdk.AppSdk getAppSdk()Returns the Nielsen AppSdk of the player. Each player has its own instance, which the plugin creates when the player opens content for the first time and closes when the player is destroyed.- Returns:
- The Nielsen AppSdk, or null before the player opens content for the first time and after it is destroyed
-