Vizbee Android Sample App demonstrates how to integrate Vizbee casting functionality into an Android mobile app.
Look for the block comments with text "[BEGIN] Vizbee Integration" and "[END] Vizbee Integration" in the code for an easy understanding of the integration.
- Add the Vizbee repository to your Android mobile app’s root settings.gradle.
- Add Vizbee SDK dependency to your app module's build.gradle.
- Add Vizbee RemoteActivity to your app's AndroidManifest.xml.
- Add
android:usesCleartextTraffic="true"attribute to application tag. If your app instead uses a custom network security config, add thecleartextTrafficPermittedflag to your network security config XML file as specified innetwork_security_config.xmlsnippet. - Create and implement the CastOptionsProvider and refer it from AndroidManifest.xml.
- Copy the files under vizbee package to your app under an appropriate package.
- In your application class, initialise Vizbee Sender SDK via VizbeeWrapper helper file.
- Adding Vizbee cast button to Toolbar in an Android menu_main
- Adding Vizbee cast button to Player in an Android exo_player_controls
- Invoke the SmartHelp API only in your app’s main Activity or Fragment . I.e., this API should be invoked just after the main screen or home screen of your app is rendered VideoGalleryFragment
- Integrate the SmartPlay API to start casting content to the receivers or play locally on the sender device VideoDetailsFragment
- Add miniplayer to all necessary screens to display casting controls to the user while they browse the app during casting fragment_video_details
- The Vizbee SDK components can be customized to match your app's specific theme. Please refer to the below files on how to incorporate them into both light and dark themes.
vizbee.xml(light)
vizbee.xml(night) - The Vizbee miniPlayer needs to be styled at the app level. Please refer to the files below for guidance.
colors.xml(light)
colors.xml(night)