Adobe Journey Optimizer API reference
extensionVersion
The extensionVersion API returns the library version.
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.
handleNotificationResponse
The handleNotificationResponse function transmits the push notification interaction feedback.
Java
Syntax
Copied to your clipboardpublic static void handleNotificationResponse(final Intent intent,final boolean applicationOpened,final String customActionId);
Parameter | Type | Description |
---|---|---|
intent | Intent | The intent contains information related to the messageId and the data. |
applicationOpened | Boolean | Shows whether the application has been opened or not. |
actionId | String | The ID of the custom action. |
Swift
Syntax
Copied to your clipboardstatic func handleNotificationResponse(_ response: UNNotificationResponse,urlHandler: ((URL) -> Bool)? = nil,closure: ((PushTrackingStatus) -> Void)? = nil)
Objective-C
Syntax
Copied to your clipboard+ (void) handleNotificationResponse: (UNNotificationResponse *) responseurlHandler: (BOOL (^)(NSURL *url)) handlerclosure: (void (^)(PushTrackingStatus status)) closure;
Parameter | Type | Description |
---|---|---|
response | UNNotificationResponse | An object containing information about the push notification details. |
urlHandler | ((URL) -> Bool)? | An optional method to handle the actionable URL from the push notification. |
closure | ((PushTrackingStatus) -> Void)? | An optional callback with PushTrackingStatus representing the tracking status of the interacted notification. |
Java
Syntax
Copied to your clipboardpublic static void handleNotificationResponse(final Intent intent,final boolean applicationOpened,final String customActionId);
Parameter | Type | Description |
---|---|---|
intent | Intent | The intent contains information related to the messageId and the data. |
applicationOpened | Boolean | Shows whether the application has been opened or not. |
actionId | String | The ID of the custom action. |
Swift
Syntax
Copied to your clipboardstatic func handleNotificationResponse(_ response: UNNotificationResponse,urlHandler: ((URL) -> Bool)? = nil,closure: ((PushTrackingStatus) -> Void)? = nil)
Objective-C
Syntax
Copied to your clipboard+ (void) handleNotificationResponse: (UNNotificationResponse *) responseurlHandler: (BOOL (^)(NSURL *url)) handlerclosure: (void (^)(PushTrackingStatus status)) closure;
Parameter | Type | Description |
---|---|---|
response | UNNotificationResponse | An object containing information about the push notification details. |
urlHandler | ((URL) -> Bool)? | An optional method to handle the actionable URL from the push notification. |
closure | ((PushTrackingStatus) -> Void)? | An optional callback with PushTrackingStatus representing the tracking status of the interacted notification. |
addPushTrackingDetails
The addPushTrackingDetails API is used to update a pending intent with important information, such as messageId and Customer Journey information.
Calling this API is mandatory, so the pending intent can be used while tracking push notification interactions.
Java
Syntax
Copied to your clipboardpublic static boolean addPushTrackingDetails(final Intent intent,final String messageId,final Map<String, String> data)
Parameter | Type | Description |
---|---|---|
intent | Intent | The pending intent that needs to be updated so it can be used when the user interacts with the notification. |
messageId | String | The message ID for the push notification. |
data | Map<String, String> | The data of the remoteMessage. |
This API returns a boolean, indicating whether the intent was updated with necessary information (messageId and Customer Journey data).
This API is not applicable for iOS.
Java
Syntax
Copied to your clipboardpublic static boolean addPushTrackingDetails(final Intent intent,final String messageId,final Map<String, String> data)
Parameter | Type | Description |
---|---|---|
intent | Intent | The pending intent that needs to be updated so it can be used when the user interacts with the notification. |
messageId | String | The message ID for the push notification. |
data | Map<String, String> | The data of the remoteMessage. |
This API returns a boolean, indicating whether the intent was updated with necessary information (messageId and Customer Journey data).
This API is not applicable for iOS.
refreshInAppMessages
Calling refreshInAppMessages API will force the Messaging extension to get an updated definition of messages from the remote.
Copied to your clipboardMessaging.refreshInAppMessages()
Copied to your clipboardMessaging.refreshInAppMessages();
Copied to your clipboardMessaging.refreshInAppMessages()
Copied to your clipboard[AEPMobileMessaging refreshInAppMessages];