Android/Fire TV Integration
Last updated
Last updated
This SDK is built for Android-based platforms including Android TV and Fire TV. We should not include any Google/Amazon/TV specific features in the SDK.
We use Kotlin and Coroutine to build up this SDK and demo apps. Java developers can also use this SDK easily
The SDK uses the following dependencies:
for image loading
for json serialization/deserialization
for network connection
for http rest api connection
for video playback
video_preview_sdk: the sdk library
demo_app: show how to integrate the SDK for Android TV apps
sample_app: show how to integrate the SDK for generic android apps
master
: The developing branch with the latest changes
You can also use gradle build as normal Android build process.
List some fastlane commands we defined in the following:
Use these instructions to integrate the SDK with your Android/Android TV/Fire TV app. If you have any questions, please contact the Lucid account team.
To add the sdk dependency, put the aar file into your libs folder and make sure the app module's build.gradle to have the following lines:
The Lucid Preview Video Android SDK uses ExoPlayer for displaying the previews, so the first step will be to add ExoPlayer to your project. Add these lines to the app module's build.gradle:
To support Java 8, add the language feature support:
Update your AndroidManifest.xml in order to complete the SDK integration.
After you have integrated the Lucid Preview Video SDK and created an access token, you must call LucidPreviewVideoSdk.init before showing any videos. Initialization is required for only once per app's lifecycle, typically on app launch.
You need to pass an access token string to the LucidPreviewVideoSdk.init API for initialization.
You can also adjust the log level for debugging, the default log level is LogLevel.ERROR, which only print the error messages. You can set your own configuration when using LucidPreviewVideoSdk.init API.
You can also adjust the cache size for the preview videos, the default size is 50 entries, you can set your own configuration when using LucidPreviewVideoSdk.init API.
Once the sdk is initialized, you can use LucidRequest to prepare the preview video information with the prepareVideo() API.
The PreviewLayout class is an UI component to display the preview video. Use setLucidVideo() API to prepare the preview content and use setPreviewPlayback() to start/stop playing preview.
There are multiple attributes for PreviewLayout. You can configurate them either using xml or Java/Kotlin APIs.
{"mode":"full","isActive":false}
We will use to help the build and deploy process. You can setup fastlane by or The Fastlane config files: and
We are using as our SAAS CI server.
The circleci needs a config file and all the automation commands are inside the config file.
The Lucid Preview Video Android SDK is available as an AAR. Download the latest aar file from