VeilVeil

Android SDK

Runtime Application Self-Protection for Android. Detects threats continuously with zero impact on app performance.

1

Add the SDK

Place VeilSDK.aar in android/app/libs/ and add to your build.gradle:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.aar'])
}
2

Initialize

Call once in your Application.onCreate() or main Activity. Your credentials are available in the Veil dashboard.

VeilSDK.initializeSDK(
    context     = this,
    clientId    = "your-client-id",
    appId       = "your-app-id",
    appName     = "My App",
    packageName = packageName,
    apiKey      = "td_live_...",
    policy      = ThreatPolicy.WARN_ONLY,
    activity    = this,
) { response, error ->
    if (response != null && !response.isSafe) {
        // threat detected — response.riskLevel, response.threatCodes
    }
}
3

Choose a policy

Control how the SDK reacts when threats are detected.

PolicyBehaviour
SILENTDetect silently — no UI shown
WARN_ONLYShow dismissible warning (default)
BLOCK_ON_HIGHBlock app on high severity threats
BLOCK_ON_CRITICALBlock app on critical threats only

Need full API documentation?

Complete reference, threat coverage, and compliance guides are available after onboarding.

Book a demo →