A modern Android demonstration application showcasing the FastPix Android Player SDK. This app demonstrates how to integrate professional video playback capabilities into Android applications with a TikTok-style reel feed interface, focusing entirely on loading and displaying media in a seamless, infinite-scroll experience.
Reel App is a reference implementation for developers looking to integrate FastPix's video streaming solutions into their Android applications. It features:
- Video Streaming: High-performance video playback using the FastPix Android Player SDK.
- Social-style Feed: Infinite scroll reel feed similar to popular social media apps.
- Quality Selection: Dynamic video quality switching during playback.
- Playback Controls: Advanced player controls including muting and seeking.
- Video Metadata: Display creator information, timestamps, and descriptions.
- ✅ Multi-quality selection with auto-quality mode
- ✅ Subtitles switching - see guide
- ✅ Audio tracks switching - see guide
- ✅ Mute/unmute controls
- ✅ Seek bar with buffering indicators
- ✅ Error handling and recovery
- ✅ Lifecycle-aware playback (pause on background, resume on foreground)
The reel feed is dynamically populated by fetching a list of video assets directly from the FastPix API. This is handled using a Retrofit GET request to retrieve the on-demand media.
Below is the network interface snippet used in the app to fetch the media list:
@GET("on-demand")
suspend fun listMedia(
@Query("limit") limit: Int = 10,
@Query("offset") offset: Int = 1,
@Query("orderBy") orderBy: String = "desc", // "asc" or "desc"
): Response<ListMediaResponse>For complete details on the request parameters and response payload, refer to the official FastPix List Media API Documentation.
- Language: Kotlin
- UI Framework: Jetpack Compose
- Architecture Pattern: MVVM
- Dependency Injection: Dagger Hilt
- Video Playback:
fastpix-android-player(FastPix Player SDK) - Networking:
Retrofit 2(REST API client),okhttp3(HTTP client with interceptors),kotlinx-serialization(JSON serialization) - UI:
Jetpack Compose(Declarative UI),Material3(Material Design components),Coil(Image and video frame loading) - State Management:
Kotlin Flow(Reactive streams),Compose State(Local composition state) - Build Tools: Gradle 9.4.1, Kotlin 1.9+, KSP (Kotlin Symbol Processing), ProGuard/R8 for optimization
Before setting up the project, ensure you have:
- Android Studio (latest version recommended)
- Java Development Kit (JDK) 11 or higher
- Android SDK with API level 24+ (minimum SDK)
- Gradle 9.4.1 (included via wrapper)
git clone https://github.com/FastPix/demo-android-reel-app.git
cd demo-android-reel-appBefore opening the project, gather:
- FastPix Credentials: Visit your FastPix Dashboard and copy your Token ID and Secret Key.
- GitHub PAT: Go to GitHub Settings → Developer settings → Personal access tokens, create a new token with the
read:packagesscope, and copy it.
Create or edit the local.properties file in the project root directory with your credentials:
# Android SDK path (usually auto-detected, but you can specify it)
sdk.dir=/path/to/your/android/sdk
# FastPix API Credentials
fastpix.tokenId=YOUR_FASTPIX_TOKEN_ID
fastpix.secretKey=YOUR_FASTPIX_SECRET_KEY
# GitHub Credentials for Maven package resolution
github.username=YOUR_GITHUB_USERNAME
github.token=YOUR_GITHUB_PERSONAL_ACCESS_TOKEN- Open the project in Android Studio.
- Android Studio will automatically detect and sync Gradle dependencies.
- Connect an Android device (API 24+) or start an emulator.
- Click the Run button (or press
Shift + F10).
# Clean the project
./gradlew clean
# Build the debug APK
./gradlew assembleDebug
# Install on connected device
./gradlew installDebug
# Or build and run directly
./gradlew installDebug
adb shell am start -n com.fastpix.reelappexample.debug/com.fastpix.reelappexample.MainActivityProblem: Could not find io.fastpix:fastpix-android-player
Solution:
- Verify
github.usernameandgithub.tokeninlocal.properties. - Ensure GitHub PAT has the
read:packagesscope. - Run
./gradlew clean --refresh-dependencies.
Problem: BuildConfig.FASTPIX_TOKEN_ID is undefined
Solution:
- Confirm
fastpix.tokenIdandfastpix.secretKeyare correctly set inlocal.properties. - Clean and rebuild:
./gradlew clean assembleDebug.
Problem: Video playback shows "Content not Available"
Solution:
- Verify the playback ID is valid.
- Check network connectivity.
- Ensure the video has finished processing on the FastPix platform.
Problem: Only the default audio plays and no subtitle options appear, even when the original source had multiple audio tracks or embedded captions.
Solution:
FastPix does not automatically extract alternate audio streams or embedded subtitle tracks from a source file or URL. This includes YouTube videos imported by URL and on device uploads — only the default muxed audio is ingested. You must supply tracks explicitly using one of the methods in the Adding Audio Tracks & Subtitles API Reference.
- FastPix Platform: fastpix.com
- FastPix Docs: fastpix.com/docs
- Android Player SDK: github.com/FastPix/fastpix-android-player
- Create Media from URL: fastpix.com/docs/.../create-media
- Upload Media from Device: fastpix.com/docs/.../direct-upload-video-media
- Add Audio / Subtitle Track: fastpix.com/docs/.../add-media-track
- Generate Subtitle Track: fastpix.com/docs/.../generate-subtitle-track
Reel App is licensed under the MIT License - see the LICENSE file for details.
For issues or questions:
- Check the Troubleshooting section above.
- Review FastPix Documentation.
- Open an issue on GitHub Issues.
- Contact FastPix support at support@fastpix.com.