--- title: "Migrating from v6" slug: "migrating-from-engage-android-sdk-v6-to-v7" updated: 2026-04-15T11:47:54Z published: 2026-04-15T11:47:54Z canonical: "docs.mapp.com/migrating-from-engage-android-sdk-v6-to-v7" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Migrating from v6 ## Goal Migrate an existing Engage v6 Android SDK implementation to Engage v7 by updating SDK usage patterns, APIs, and behaviors. --- ## Background Information & Prerequisites This migration applies to Android applications currently using the Engage v6 SDK. Before starting the migration: - Engage is already integrated into your Android application. - You are familiar with your existing Engage v6 implementation. - The Engage v7 SDK is available for your project. --- ## Procedure ### Initializing the SDK The initialization call remains the same in v6 and v7. However, SDK behavior changes in v7. **v6** ```kotlin Appoxee.engage(application, options) val sdk = Appoxee.instance() ``` **v7** ```kotlin Appoxee.engage(application, options) val sdk = Appoxee.instance() ``` In Engage v7, calling `instance()` throws an exception if `engage()` was not called first. --- ### Handling SDK Readiness SDK readiness checks are updated to use observers instead of init listeners. **v6** ```kotlin if (sdk.isReady()) {    // safe to use } sdk.addInitListener { ready -> ... } ``` **v7** ```kotlin if (sdk.isReady()) {    // safe to use } sdk.subscribe(observer) // observer implements AppoxeeObserver sdk.unsubscribe(observer) ``` --- ### Managing Aliases Alias handling becomes asynchronous in Engage v7. **v6** ```kotlin sdk.setAlias("user123") val alias = sdk.getAlias() ``` **v7** ```kotlin sdk.setAlias("user123", resendCustomAttributes = false)    .enqueue { result -> println("alias set to $result") } sdk.getAlias()    .enqueue { alias -> println("alias = $alias") } ``` --- ### Managing Tags Tag operations now accept lists and return asynchronous results. **v6** ```kotlin sdk.addTag("vip") sdk.removeTag("vip") val tags = sdk.getTags() ``` **v7** ```kotlin sdk.addTags(listOf("vip"))    .enqueue { ok -> println("added: $ok") } sdk.removeTags(listOf("vip"))    .enqueue { ok -> println("removed: $ok") } sdk.getTags()    .enqueue { tags -> println("List of tags: $tags") } ``` --- ### Managing Custom Attributes Custom attribute handling changes in Engage v7. The v6 `removeAttribute()` method has been replaced by `removeCustomAttributes(Set<String>)`, which removes a set of attribute keys at once. **v6** ```kotlin sdk.setAttributes(mapOf("age" to 30)) val age = sdk.getAttributeStringValue("age") sdk.removeAttribute("age") ``` **v7** ```kotlin sdk.addCustomAttributes(mapOf("age" to 30))    .enqueue { ok -> println("set age: $ok") } sdk.getCustomAttributes(setOf("age"))    .enqueue { attrs -> println("age = ${attrs["age"]}") } sdk.removeCustomAttributes(setOf("age","language")) ``` --- ### Updating Push Messaging Push messaging APIs in Engage v7 are asynchronous and include additional helper methods. **v6** ```kotlin val enabled = sdk.isPushEnabled() sdk.setPushEnabled(true) sdk.setToken(token) sdk.setRemoteMessage(remoteMessage) ``` **v7** ```kotlin sdk.isPushEnabled()    .enqueue { enabled -> println("push enabled? $enabled") } sdk.enablePush(true)    .enqueue { ok -> println("enabled: $ok") } sdk.getFirebaseToken()    .enqueue { token -> println("firebase token: $token") } sdk.handlePushMessage(remoteMessage) val isMapp = sdk.isPushMessageFromMapp(remoteMessage) sdk.updateFirebaseToken(newToken) sdk.setPushBroadcast(MyPushReceiver::class.java) sdk.closeNotification(notificationId) ``` --- ### Configuring Geofencing Geofencing APIs have been updated to return asynchronous results. **v6** ```kotlin sdk.startGeoFencing(callback) sdk.stopGeoFencing(callback) val active = sdk.isGeofencingActive() ``` **v7** ```kotlin sdk.startGeofencing(enterDelaySeconds = 0)    .enqueue { status -> println("geo started: $status") } sdk.stopGeofencing()    .enqueue { status -> println("geo stopped: $status") } sdk.isGeofencingActive()    .enqueue { active -> println("active? $active") } ``` --- ### Triggering In-App Messages The trigger method now requires an `Activity` and returns an asynchronous result. **v6** ```kotlin sdk.triggerInApp(context, "purchase_complete") ``` **v7** ```kotlin sdk.triggerInApp(activity, "purchase_complete")    .enqueue { shown -> println("trigger success? $shown") } ``` --- ### Working with Inbox Messages Inbox APIs return asynchronous responses and include additional helper methods. **v6** ```kotlin sdk.fetchInboxMessages() sdk.fetchInboxMessage(templateId) ``` **v7** ```kotlin sdk.fetchInboxMessages()    .enqueue { response -> println("messages: ${response?.messages}") } sdk.fetchInboxMessage(templateId)    .enqueue { msg -> println("message: $msg") } sdk.fetchLatestInboxMessage()    .enqueue { msg -> println("latest: $msg") } sdk.showInboxMessage(activity, message) sdk.updateInboxMessageStatus(message, MessageStatus.READ)    .enqueue { ok -> println("status updated: $ok") } ``` --- ### Logging Out Logout behavior is asynchronous in Engage v7. **v6** ```kotlin sdk.logOut(true) ``` **v7** ```kotlin sdk.logout(pushEnabled = true)    .enqueue { ok -> println("logout: $ok") } ``` --- ### Accessing Device Information Device information retrieval is now via an asynchronous API. **v6** ```kotlin val info = sdk.getDeviceInfo() val last = sdk.getLastActivity() ``` **v7** ```kotlin sdk.getDevice()    .enqueue { device -> println("device: $device") } ```