/

Quick Start - Monitor for Android

Get ByteHide Monitor protecting your Android application in under 5 minutes using cloud zero-config setup.


Prerequisites


Step 1: Add the Maven Repository

Add the ByteHide Maven repository to your settings.gradle.kts:

Kotlin
pluginManagement {
    repositories {
        maven {
            url = uri("https://maven.bytehide.com/releases")
        }
        google()
        mavenCentral()
    }
}

dependencyResolutionManagement {
    repositories {
        maven {
            url = uri("https://maven.bytehide.com/releases")
        }
        google()
        mavenCentral()
    }
}

Step 2: Add the Dependency

Add Monitor to your app module's build.gradle.kts:

Kotlin
dependencies {
    implementation("com.bytehide:monitor-integration:2.0.0")
}

Step 3: Set Your Token

Configure your project token as an environment variable:

Bash
# Linux/macOS
export BYTEHIDE_API_TOKEN="your-token-here"

# Windows (PowerShell)
$env:BYTEHIDE_API_TOKEN = "your-token-here"

# Windows (CMD)
set BYTEHIDE_API_TOKEN=your-token-here

Step 4: Build and Run

Build your project. Monitor will automatically initialize with the configuration from your ByteHide dashboard.

Bash
./gradlew assembleRelease

Zero-Config Cloud Mode

With cloud configuration, the Gradle plugin embeds your token in the APK at build time. At runtime, Monitor connects to the ByteHide API, downloads your active configuration, and applies protections. Changes made in the dashboard take effect without rebuilding. The token can be set via the BYTEHIDE_API_TOKEN environment variable, the bytehide.api.token system property, or directly in the bytehideMonitor Gradle block.


What Happens at Runtime

  1. The Gradle plugin embeds your token in the APK during build
  2. At runtime, Monitor connects to the ByteHide API
  3. Downloads your active protection configuration from the dashboard
  4. Applies all configured protections
  5. Periodically syncs for hot updates (configuration changes without rebuild)

Next Steps

Previous
Introduction