1Create app and collect credentials
Open the client portal, create or select the Android app, then open API Keys. The developer needs three values only.
- ✓App ID: unique Atryvo app identifier shown inside the app dashboard.
- ✓API key: live SDK key generated from API Keys.
- ✓Base URL: use
https://atryvo.com/api for production.
Never hardcode customer passwords or sensitive user data in events. Keep API keys in build config or remote configuration controlled by the app team.
2Add the SDK dependency
Use the published Android SDK coordinate from GitHub Packages. Configure repository read access securely when required; never commit package credentials. Use a local AAR only for temporary validation builds.
// app/build.gradle
dependencies {
implementation("com.atryvo:atryvo-sdk:1.2.1")
}
// Temporary local AAR fallback
dependencies {
implementation(files("libs/atryvo-sdk-release.aar"))
}
3Add safe Android permissions
Atryvo only needs network access for analytics upload. FCM permission is needed when the app wants push token and uninstall validation support.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
- ✓Do not request SMS, contacts, call log, OTP, password, card, CVV, or UPI PIN access for Atryvo.
- ✓The SDK does not read EditText values automatically.
4Initialize in Application
Initialize once from your custom Application class. Keep debug logs off in production builds. This base example leaves automatic clicks off; enable them only when using the codeless path above.
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
Atryvo.init(
context = applicationContext,
config = AtryvoConfig(
appId = BuildConfig.ATRYVO_APP_ID,
apiKey = BuildConfig.ATRYVO_API_KEY,
baseUrl = "https://atryvo.com/api",
environment = Environment.PRODUCTION,
enableDebugLog = BuildConfig.DEBUG,
autoTrackLifecycle = true,
autoTrackScreenViews = true,
autoTrackClicks = false,
autoTrackCrashes = true,
collectDeviceInfo = true
)
)
}
}
5Consent, customer ID, and user properties
Call consent after your own privacy or consent screen is accepted. Set customer identity after login so the portal can search and understand users.
// After user accepts analytics/marketing consent
Atryvo.setUserConsent(true)
// After login
Atryvo.setCustomerUserId(customerId)
Atryvo.setUserProperty("mobile_hash", sha256(mobileNumber))
Atryvo.setUserProperty("customer_type", "registered")
Atryvo.setUserProperty("city", "Delhi")
Use hashed mobile or internal customer IDs. Do not send raw OTP, password, card number, CVV, UPI PIN, or private text field values.
6Track core app behavior
Use custom calls for outcomes your app knows. The example below sends fixed, non-sensitive context; use a domain-approved schema for your own app.
Atryvo.trackScreen("CatalogScreen")
Atryvo.trackEvent(
name = "catalog_item_opened",
params = mapOf("category" to "home_goods")
)
- ✓Use stable, industry-specific names such as
trip_search_clicked, appointment_search_clicked, or cart_review_clicked.
- ✓Do not count a search or quote as revenue. Send revenue only for a confirmed outcome and deduplicate with an approved transaction ID.
7Push token, uninstall tracking, and smart links
For uninstall detection, the app must register an FCM token with Atryvo. The server validates stale tokens using Firebase credentials.
FirebaseMessaging.getInstance().token.addOnSuccessListener { token ->
Atryvo.setPushToken(token, "fcm")
}
// In launcher Activity or deep-link Activity
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Atryvo.handleDeepLink(intent)
}
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
Atryvo.handleDeepLink(intent)
}
- ✓Uninstall is not instant; it is detected after validation jobs find invalid FCM tokens.
- ✓Smart links and deferred deep links should be tested from the Atryvo Links page before release.
8Verify in portal and release
Before release, install a fresh build and verify the exact app in the client portal.
- ✓SDK Health shows app version, SDK version, API key status, consent status, queue size, and last event received.
- ✓Overview live users equals real active devices, not duplicate anonymous IDs.
- ✓Events page shows expected event names and no sensitive parameters.
- ✓Screens page shows meaningful screen names, not only obfuscated Activity names.
- ✓Uninstall page shows push token after app launch and consent.
- ✓Crash safety: SDK failure must never crash or block the host app.
QAQuick test plan for developers
Use this short test sequence for every client integration before shipping to production.
- ✓Fresh install the app, open once, then confirm one install and one live user in Atryvo.
- ✓Login with a test user and confirm customer user ID is searchable in user profiles.
- ✓Open three important screens and confirm screen names and duration.
- ✓Perform one search, one action, and one successful payment test with a unique order ID.
- ✓Turn network off, perform events, turn network on, and confirm retry upload.
- ✓Uninstall app after FCM token registration, run Validate Now, then confirm token status changes when Firebase marks it invalid.