VizbeeContext

open class VizbeeContext

VizbeeContext is the core singleton class used to control Vizbee's Remote SDK. For Vizbee SDK initialization, the init() method needs to be called in the host Application's onCreate() method.

    VizbeeContext remote = VizbeeContext.getInstance();
    remote.init(application, "vzbNNNNNNN", myRemoteAdapter);
After initialization, Vizbee's Remote SDK has three entry points via which the host video application exercises Vizbee functionality.
  1. CastIcon: When a user clicks on the cast icon.
  2. SmartPlay: When a user clicks the play button on a video. In this case, instead of playing the video immediately, the host application calls the Vizbee SmartPlay() API. Vizbee will 'smartly' decide if the user should be shown options to play the video on TV (if available in vicinity) or instead play on phone instantly.
  3. DeepLink: When a user deeplinks from an external app such as Facebook.
The CastIcon and DeepLink user flows do not require any special integration besides manifest file and menu config file updates. To implement the SmartPlay method, the existing play method in the host app needs to be replaced with SmartPlay.
    VizbeeContext.getInstance().smartPlay(currentActivity, videoObject, position);

Types

Link copied to clipboard

Functions

Link copied to clipboard
open fun addConfigFetchListener(listener: ICommandCallback<Boolean>)
Link copied to clipboard
open fun addCustomEventAttributes(customEventAttributes: JSONObject)
Link copied to clipboard
Link copied to clipboard
open fun disableLogging()
Link copied to clipboard
open fun disableUiTesting()
Link copied to clipboard
open fun enableLogging()
Link copied to clipboard
open fun enableTestDevices(deviceIds: Array<String>)
Link copied to clipboard
open fun enableUiTesting()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getHomeDiscovery(): HomeDiscovery
Get instance of HomeDiscovery which provides currently discovered devices and listener for device list changes.
Link copied to clipboard
open fun getHomeFlows(): HomeFlows
Get new instance HomeFlows to start a Vizbee UI flow.
Link copied to clipboard
Get the singleton Vizbee Remote instance.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun init(application: Application, appId: String, smartPlayAdapter: ISmartPlayAdapter)
Default init method
open fun init(application: Application, appId: String, smartPlayAdapter: ISmartPlayAdapter, isProduction: Boolean)
open fun init(@NonNull application: Application, @NonNull appId: String, @NonNull smartPlayAdapter: ISmartPlayAdapter, @NonNull options: VizbeeOptions)
Init method to explicitly control whether Vizbee production of staging config is loaded for your app.
Link copied to clipboard
Link copied to clipboard
open fun isInTestMode(): Boolean
Link copied to clipboard
open fun isSDKActive(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun onUserAuthCompleted(context: Context, authStatus: Boolean)
Link copied to clipboard
open fun playVideoOnPhone(@Nullable context: Context, @NonNull appVideoObject: Any, requestedStartPosition: Long, shouldAutoPlay: Boolean, @NonNull status: VizbeeStatus)
This method is not exposed to customers This method is public because it is being accessed from the PlayOnPhoneManager class
Link copied to clipboard
open fun removeConfigFetchLister(listener: ICommandCallback<Boolean>)
Link copied to clipboard
Link copied to clipboard
Method to set authentication adapter.
Method to set both authentication &authorization adapters.
Link copied to clipboard
open fun setContext(c: Context)
API for instrumentation testing
Link copied to clipboard
open fun setCustomMetricsAttributes(customMetricsAttributes: JSONObject)
Link copied to clipboard
Link copied to clipboard
open fun setTheme(@StyleRes theme: Int)
Link copied to clipboard
open fun setUiConfig(@NonNull config: LayoutsConfig)
open fun shouldUseCloudConfigForAllowedDevicesFilter(shouldUseCloudConfigForAllowedDevicesFilter: Boolean)
Link copied to clipboard
open fun smartHelp(@NonNull context: Context): Boolean
open fun smartHelp(@NonNull smartHelpOptions: SmartHelpOptions, @NonNull context: Context): Boolean
Link copied to clipboard
open fun smartPlay(@NonNull context: Context, @NonNull request: VizbeeRequest)
open fun smartPlay(@NonNull context: Context, @NonNull request: VizbeeRequest, @NonNull options: SmartPlayOptions)

open fun smartPlay(@NonNull context: Context, @NonNull video: Any, @NonNull position: Long): Boolean
Method to invoke "smart play" of a video stream.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard