Assurance API reference
extensionVersion
Returns the current version of the AEP Assurance extension.
registerExtension
This API has been deprecated starting in v2.0.0 and removed in v3.0.0 of the Android mobile extension.
Use MobileCore.registerExtensions()
API instead.
Registers the Assurance extension with the Mobile Core.
startSession
The startSession
API needs to be called to begin a AEP Assurance session. When called, the Mobile SDK displays a PIN authentication overlay to begin a session.
You may call this API when the app launches with a URL (see code snippet below for sample usage)
This API is optional for Android. Deep linking is the best way to connect to an Assurance session when using the Android SDK. Assurance SDK on Android is already setup to handle incoming intents to your app. You can add an intent filter for incoming links in your app to complete the deep link configuration.
Java
Syntax
Copied to your clipboardpublic static void startSession(@NonNull final String url)
Example
Copied to your clipboardfinal String url = "<assurance_session_url>";Assurance.startSession(url);
Kotlin
Example
Copied to your clipboardval url: String = "<assurance_session_url>"Assurance.startSession(url)
Swift
Example
Copied to your clipboardfunc application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {do {AEPAssurance.startSession(url)return false}}
For SceneDelegate based applications
Copied to your clipboardfunc scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {AEPAssurance.startSession(URLContexts.first!.url)}
Objective-C
Syntax
Copied to your clipboard+ (void) startSession: (NSURL* _Nonnull) url;
Example
Copied to your clipboard- (BOOL)application:(UIApplication *)app openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {[AEPAssurance startSession:url];return false;}
This API is optional for Android. Deep linking is the best way to connect to an Assurance session when using the Android SDK. Assurance SDK on Android is already setup to handle incoming intents to your app. You can add an intent filter for incoming links in your app to complete the deep link configuration.
Java
Syntax
Copied to your clipboardpublic static void startSession(@NonNull final String url)
Example
Copied to your clipboardfinal String url = "<assurance_session_url>";Assurance.startSession(url);
Kotlin
Example
Copied to your clipboardval url: String = "<assurance_session_url>"Assurance.startSession(url)
Swift
Example
Copied to your clipboardfunc application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {do {AEPAssurance.startSession(url)return false}}
For SceneDelegate based applications
Copied to your clipboardfunc scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {AEPAssurance.startSession(URLContexts.first!.url)}
Objective-C
Syntax
Copied to your clipboard+ (void) startSession: (NSURL* _Nonnull) url;
Example
Copied to your clipboard- (BOOL)application:(UIApplication *)app openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {[AEPAssurance startSession:url];return false;}