Skip to content

ClaspTV/vizbee-android-sample-app

Repository files navigation

Vizbee Android Sample App

Vizbee Android Sample App demonstrates how to integrate Vizbee casting functionality into an Android mobile app.

Integration Steps for your 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.

Build Setup

  1. Add the Vizbee repository to your Android mobile app’s root settings.gradle.
  2. Add Vizbee SDK dependency to your app module's build.gradle.

AndroidManifest Setup

  1. Add Vizbee RemoteActivity to your app's AndroidManifest.xml.
  2. Add android:usesCleartextTraffic="true" attribute to application tag. If your app instead uses a custom network security config, add the cleartextTrafficPermitted flag to your network security config XML file as specified in network_security_config.xml snippet.
  3. Create and implement the CastOptionsProvider and refer it from AndroidManifest.xml.

Code Setup

  1. Copy the files under vizbee package to your app under an appropriate package.

SDK Initialisation

  1. In your application class, initialise Vizbee Sender SDK via VizbeeWrapper helper file.

Add CastIcon

  1. Adding Vizbee cast button to Toolbar in an Android menu_main
  2. Adding Vizbee cast button to Player in an Android exo_player_controls

Add SmartHelp

  1. 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

Implement Smartplay

  1. Integrate the SmartPlay API to start casting content to the receivers or play locally on the sender device VideoDetailsFragment

Add Miniplayer

  1. Add miniplayer to all necessary screens to display casting controls to the user while they browse the app during casting fragment_video_details

Styling

  1. 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)
  2. 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)

Documentation

About

The Vizbee Android Sample App is designed to demonstrate the integration and functionality of the Vizbee SDK within an Android application. This demo app showcases key features, allowing developers to understand how to implement and customize the Vizbee SDK for their own applications.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors