Quick Start - Monitor for Android
Get ByteHide Monitor protecting your Android application in under 5 minutes using cloud zero-config setup.
Prerequisites
- Android Studio with Gradle support
- A ByteHide account with a Monitor project (create one here)
- Your ByteHide Project Token from cloud.bytehide.com
Step 1: Add the Maven Repository
Add the ByteHide Maven repository to your settings.gradle.kts:
pluginManagement {
repositories {
maven {
url = uri("https://maven.bytehide.com/releases")
}
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositories {
maven {
url = uri("https://maven.bytehide.com/releases")
}
google()
mavenCentral()
}
}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:
dependencies {
implementation("com.bytehide:monitor-integration:2.0.0")
}dependencies {
implementation("com.bytehide:monitor-integration:2.0.0")
}Step 3: Set Your Token
Configure your project token as an environment variable:
# 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# 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-hereStep 4: Build and Run
Build your project. Monitor will automatically initialize with the configuration from your ByteHide dashboard.
./gradlew assembleRelease./gradlew assembleReleaseZero-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
- The Gradle plugin embeds your token in the APK during build
- At runtime, Monitor connects to the ByteHide API
- Downloads your active protection configuration from the dashboard
- Applies all configured protections
- Periodically syncs for hot updates (configuration changes without rebuild)