Mobile Platform

Android App Setup

Compile, configure, and publish your native Kotlin Android application to the Google Play Store.

O

App Feature & Screen Overview

Before you begin the technical setup, here is a visual overview of the SnapReels Android Application.

A

Architecture Overview (For Developers)

The Android Application is built entirely in Kotlin and utilizes modern Jetpack Compose for UI rendering.

  • Architecture: MVVM (Model-View-ViewModel) enforcing strict separation of concerns.
  • Networking: Retrofit2 with OkHttp for optimized REST API communication.
  • Dependency Injection: Hilt / Dagger for managing scoped dependencies and ViewModels.
  • Media: Google Media3 (ExoPlayer) with VideoCacheManager for disk-backed pre-buffering.
  • Navigation: Jetpack Navigation Compose with deep link support.
  • Storage: DataStore (Preferences) for async key-value persistence.
1

Change the Application Logo

To replace the default launcher icon and visual branding logo inside the app:

  1. Design a custom square logo (PNG format, recommended size 512x512 px).
  2. Rename the file to app_logo.png.
  3. Paste and overwrite the logo file inside the directory:
    Android App/app/src/main/res/drawable/app_logo.png
  4. The app main manifest automatically links to this resource using standard tags:
    android:icon="@drawable/app_logo"
Logo Change Location Diagram
Replacement structure of drawable assets
2

Change Package Name (Application ID)

The Application ID acts as the unique identifier for your app on the Google Play Store. It is configured in the application-level Gradle settings:

  1. Open the file: Android App/app/build.gradle.kts
  2. Locate the applicationId line inside defaultConfig:
build.gradle.kts (Lines 14-22)
defaultConfig { applicationId = "com.snapreels.devsnaplix" // Replace with your unique package name minSdk = 24 targetSdk = 36 versionCode = 1 versionName = "1.0.0" }

3. Update the package name string to your custom store package ID (e.g. "com.yourname.snapreels").

4. To refactor package structures inside Android Studio: Select target Java packages directory folders, right click and choose Refactor -> Rename -> Rename Package.

Package Renaming Process
Locating Application ID inside Gradle Configs
3

Configure Firebase Console & Setup file

To enable authentication, login mechanisms, and notifications, you must link Firebase Services:

  1. Go to the Firebase Console and add a new Android Project.
  2. Enter the exact package name (Application ID) configured in Step 2.
  3. Register the app and download the configuration file: google-services.json.
  4. Drag and paste the downloaded file directly inside your app folder:
    Android App/app/google-services.json
Firebase Configuration File Location
Placing google-services.json inside the app module directory
4

Configure API URL & Security Keys

The Android app interacts with your server database via API calls. Update your app configuration values here:

  1. Open the configuration file: Android App/app/src/main/java/com/example/data/AppConfig.kt
  2. Replace the endpoints and secrets to match your live production website server:
AppConfig.kt
package com.example.data object AppConfig { // Replace with your Production URL (e.g. https://yourdomain.com/api/mobile/v1) const val API_URL = "https://snapreels.gadohost.com/api/mobile/v1" // Replace with your secret security token const val API_KEY = "snap_apk_8ac0381c8c2e399b87494dd5ac4cfbc2420e1aced6c361a4" }
API endpoint customization
Editing API Server values inside AppConfig.kt
5

Configure Google AdMob Ads

To display advertisements in your mobile app, configure your primary Google AdMob App ID inside the manifest properties:

  1. Open the file: Android App/app/src/main/AndroidManifest.xml
  2. Scroll down inside the <application> element to locate the AdMob metadata tags:
AndroidManifest.xml (Lines 18-20)
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-3940256099942544~3347511713" /> <!-- Replace value with AdMob App ID -->

3. Replace the test application ID value (ca-app-pub-3940256099942544~3347511713) with your live production AdMob Application ID.

⚠️

Important Notice for Ad Units

Do not hardcode individual ad unit IDs (Banner, Reward, Interstitial) in the source code. You can configure them dynamically in the online Admin Panel under Mobile Application Settings once your server is live.

AdMob configuration in manifest
Setting AdMob metadata values inside AndroidManifest.xml
6

Generate Firebase SHA-1 Fingerprint

Google Sign-In requires your app's SHA-1 fingerprint registered in the Firebase Console. Without it, users will get a "Google Sign-In Failed" error.

  1. Open your project in Android Studio.
  2. Click on the Gradle tab on the far right edge of the IDE window.
  3. Expand SnapReels -> app -> Tasks -> android and double click on signingReport.
  4. Look at the bottom Run console. Copy the SHA1 string (e.g., 5B:23:45:67:89...) under the debug and release variants.
  5. Go to your Firebase Console -> Project Settings -> General. Scroll down to your Android app and click Add fingerprint. Paste the SHA-1 key and save.
7

Push Notification Setup (FCM)

SnapReels uses Firebase Cloud Messaging (FCM) to deliver push notifications. The Android app is already pre-configured to receive them, but you must link it to your backend:

  1. In the Firebase Console, go to Project settings > Service accounts.
  2. Click Generate new private key. This will download a `.json` file to your computer.
  3. Open your SnapReels Admin Panel in your browser and navigate to Settings > Security.
  4. Open the `.json` file you downloaded using a text editor (like Notepad), copy all of its contents, and paste it into the Firebase Service Account JSON field in the Admin Panel.
  5. Click Save. You can now send push notifications to your Android users from the Marketing > Push Notifications page in the Admin Panel!
⚠️

Notification Icons

The default push notification icon is named ic_notification.png. You can replace it by adding your own transparent white icon to the app/src/main/res/drawable/ folder.

8

Visual Customization (Themes & Deep Links)

App Name & Strings

To change the name of the app shown on the user's home screen, open app/src/main/res/values/strings.xml and change app_name.

Color Theme

To change the primary colors, gradients, and backgrounds of the app, open app/src/main/java/com/example/ui/theme/Color.kt and modify the Hex codes (e.g., PrimaryPink, BackgroundDark).

Deep Links (Intent Filters)

To allow users to open web links directly inside your app (e.g., sharing a video), open app/src/main/AndroidManifest.xml. Locate the <intent-filter> under the MainActivity and replace snapreels.gadohost.com with your own domain name.

9

Generate Release Build for Play Store

Before submitting to Google Play, you must compile a signed Android App Bundle (.aab).

  1. In Android Studio, click on the top menu: Build -> Generate Signed Bundle / APK.
  2. Select Android App Bundle and click Next.
  3. Under Key store path, click Create new.... Choose a safe location on your computer to save your .jks file.
  4. Fill in a strong password, an alias (e.g., release), and your certificate details. IMPORTANT: Never lose this keystore file or its passwords, otherwise you can never update your app on the Play Store again!
  5. Click Next, select the release build variant, and click Finish.
  6. Android Studio will generate an app-release.aab file in your app/release/ folder. Upload this file to your Google Play Console!