Assurance extension has a dependency on AEP Core SDK which must be installed to use the extension.
-
Installation via Maven & Gradle is the easiest and recommended way to get the AEP SDK into your Android app. Add a dependency on Assurance and Core to your mobile application. To ensure consistent builds, it is best to use the AEP SDK Bill of Materials (BOM) and explicitly specify the
sdk-bom
dependency version and update it manually when required.implementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+")) implementation("com.adobe.marketing.mobile:core") implementation("com.adobe.marketing.mobile:assurance")
implementation platform('com.adobe.marketing.mobile:sdk-bom:3.+') implementation 'com.adobe.marketing.mobile:core' implementation 'com.adobe.marketing.mobile:assurance'
-
Import MobileCore and Assurance extensions:
import com.adobe.marketing.mobile.MobileCore; import com.adobe.marketing.mobile.Assurance;
import com.adobe.marketing.mobile.MobileCore import com.adobe.marketing.mobile.Assurance
-
Import the Assurance library into your project and register it with
MobileCore
public class MainApp extends Application { private static final String APP_ID = "YOUR_APP_ID"; @Override public void onCreate() { super.onCreate(); MobileCore.setApplication(this); MobileCore.setLogLevel(LoggingMode.VERBOSE); MobileCore.configureWithAppID(APP_ID); List<Class<? extends Extension>> extensions = Arrays.asList( Assurance.EXTENSION,...); MobileCore.registerExtensions(extensions, o -> { Log.d(LOG_TAG, "AEP Mobile SDK is initialized"); }); } }
class MyApp : Application() { override fun onCreate() { super.onCreate() MobileCore.setApplication(this) MobileCore.setLogLevel(LoggingMode.VERBOSE) MobileCore.configureWithAppID("YOUR_APP_ID") val extensions = listOf(Assurance.EXTENSION, ...) MobileCore.registerExtensions(extensions) { Log.d(LOG_TAG, "AEP Mobile SDK is initialized") } } }
You can connect to an Assurance session via the startSession()
api or, via a deep link configured in your app. Deep link is the recommended way of connecting to an Assurance session when using the Android SDK.
Assurance extension is already setup to handle incoming intents to your app. It is sufficient to add an intent filter for incoming links in your app to complete the deep link configuration. The combination of android:host
and android:scheme
(in the form of <host>://<scheme>
) of this intent filter will serve as the Base URL
while creating a session.
- Visit the Adobe Experience Platform Assurance UI and log in using your credentials for the Experience Cloud.
- Select Create Session.
- In the Create New Session dialog, you will be prompted a
Session Name
and aBase URL
. - Enter a name to identify the session. Provide a deeplink that was configured in your app as the
Base URL
. After providing these details, select Next.
After you've created a session, you can begin connecting to it by following these steps:
- Ensure that you see a QR code and a PIN in the Session Details dialog.
- Use your device camera or an app to scan the QR code and to open your app.
- When your app launches, you should see the a PIN entry screen overlaid.
- Type in the PIN from the previous step and press Connect.
- Your app should now be connected to Assurance and an Adobe Experience Platform icon will be displayed on your app.