Mobile use cases supported in Adobe Campaign Standard by using the Adobe Experience Platform SDKs

This KB article provides information about how to support the following use cases:

Note:

Supporting these use cases involves installing and configuring the Adobe Experience Platform SDKs, Adobe Experience Platform Launch, and Adobe Campaign.

Register a mobile profile in Campaign Standard

Here is the information about how to complete this use case:

Required extensions

To configure this use case, you need the following extensions from Experience Platform Launch:

  • Profile, which is automatically installed.
    For more information about the Profile extension, see Profile.

Postbacks

No postbacks are required for this use case.

Experience Platform SDK implementation

Here is the platorm-specific information for iOS and Androd:

iOS

In iOS, the following Experience Platform APIs are required:

  • Lifecycle Start, when the app is started and when the app is in the foreground. 
  • Lifecycle Pause, when the app is in the background.

For more information, see Lifecycle extension in iOS.

Sample implementaton

Here is a sample implementation of this use case in IOS:

 

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
 
 
 ACPCore.setLogLevel(.debug)
 appId = SettingsBundle.getLaunchAppId()
  
 //===== START Set up Adobe SDK =====
 ACPCore.configure(withAppId: appId)
  
 ACPCampaign.registerExtension()
 ACPIdentity.registerExtension()
 ACPLifecycle.registerExtension()
 ACPUserProfile.registerExtension()
 ACPSignal.registerExtension()
 ACPCore.start()
 ACPCore.lifecycleStart(nil)
  
 return true
 }
 
func applicationDidEnterBackground(_ application: UIApplication) {
 ACPCore.lifecyclePause()
 }
  
 func applicationDidBecomeActive(_ application: UIApplication) {
 // Workaround until jira AMSDK-7411 is fixed.
 sleep(2)
 ACPCore.lifecycleStart(nil)
 }

Android

In Android, the following Experience Platform APIs are required:

  • OnResume
  • OnPause

For more information, see Lifecycle extension in Android.

Sample implentation

Here is a sample implementation for this use case in Android:

@Override
 
public void onResume() {
 super.onResume();
 MobileCore.setApplication(getApplication());
 MobileCore.lifecycleStart(null);
 handleOpenTracking();
 }
 
 @Override
 public void onPause() {
 super.onPause();
 MobileCore.lifecyclePause();
 }

Send a push token to Campaign Standard

Here is the information about how to complete this use case:

Required extensions

To configure this use case, you need the following extensions from Experience Platform Launch:

Postbacks

No postbacks are required for this use case.

Experience Platform SDK implementation

Here is the platorm-specific information for iOS and Androd:

iOS

In iOS, the following Experience Platform SDK is required:

Sample implementation

Here is the sample implementation for this use case in IOS:

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
 
 // Register Device Token
 ACPCore.setPushIdentifier(deviceToken)
 }

Android

In Android, the following Experience Platform SDK is required:

Sample implementation

Here is the sample implementation for this use case in Android:

@Override
public void onNewToken(String token) {
    Log.d(TAG, "Refreshed token: " + token);
    MobileCore.setPushIdentifier(token);
}

Enrich a mobile profile with custom data from your app

Here is the information about how to complete this use case:

Required extensions

To configure this use case, you need the following extensions from Experience Platform Launch:

  • Mobile Core, which is automatically installed.
    For more information about the Mobile Core extension, see Mobile Core.
  • Profile, which is automatically installed.
    For more information about the Profile extension, see Profile.

Postbacks

You need to create rules for PII postbacks.
For more information, see PII Postbacks.

Experience Platform implementation

Here is the platform-specific information for iOS and Android:

iOS

In iOS, the following Experience Platform API is required:

  • collectPII
    For more information, see collectPII.

Sample implementaton

Here is a sample implementation of this use case in iOS:

ACPCore.collectPii(["email":email, "firstName":firstName, "lastName":lastName])

Android

In Android, the following Experience Platform API is required:

  • collectPII
    For more information, see collectPII.

Sample implentation

Here is a sample implementation for this use case in Android:

HashMap<String, String> data = new HashMap<>();
data.put("firstName", firstNameText);
data.put("lastName", lastNameText);
data.put("email", emailText);
MobileCore.collectPii(data);

Enrich a mobile profile with Lifecycle data from your app

Here is the information about how to complete this use case:

Required extensions

To configure this use case, you need the following extensions from Experience Platform Launch:

  • Mobile Core, which is automatically installed.
    For more information about the Mobile Core extension, see Mobile Core.
  • Profile, which is automatically installed.
    For more information about the Profile extension, see Profile.

Postbacks

You need to create rules for the PII postback. For more information, see PII Postbacks.

Note:

Campaign does not distinguish between custom data or lifecycle data from the mobile app. Both types of data can be sent to server using a collectPii postback rule in response to an event in the mobile app.

Experience Platform SDK implementation

Here is the platorm-specific information for iOS and Androd:

iOS

In iOS, the following Experience Platform APIs are required:

  • Lifecycle Start, when the app is started and when the app is in the foreground. 
  • Lifecycle Pause, when the app is in the background.

For more information, see Lifecycle extension in iOS.

Sample implementaton

Here is a sample implementation of this use case in IOS:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
 
 
 ACPCore.setLogLevel(.debug)
 appId = SettingsBundle.getLaunchAppId()
  
 //===== START Set up Adobe SDK =====
 ACPCore.configure(withAppId: appId)
  
 ACPCampaign.registerExtension()
 ACPIdentity.registerExtension()
 ACPLifecycle.registerExtension()
 ACPUserProfile.registerExtension()
 ACPSignal.registerExtension()
 ACPCore.start()
 ACPCore.lifecycleStart(nil)
  
 return true
 }
 
func applicationDidEnterBackground(_ application: UIApplication) {
 ACPCore.lifecyclePause()
 }
  
 func applicationDidBecomeActive(_ application: UIApplication) {
 // Workaround until jira AMSDK-7411 is fixed.
 sleep(2)
 ACPCore.lifecycleStart(nil)
 }

Android

In Android, the following Experience Platform APIs are required:

  • OnResume
  • OnPause

For more information, see Lifecycle extension in Android.

Sample implentation

Here is a sample implementation for this use case in Android:

@Override
 
public void onResume() {
 super.onResume();
 MobileCore.setApplication(getApplication());
 MobileCore.lifecycleStart(null);
 handleOpenTracking();
 }
 
 @Override
 public void onPause() {
 super.onPause();
 MobileCore.lifecyclePause();
 }

Track user interaction with Push notifications

Here is the information about how to complete this use case:

Required extensions

To configure this use case, you need the following extensions from Experience Platform Launch:

Postbacks

You need to create rules for push notifications tracking postback For more information, see Push notifications tracking postback.

Experience Platform SDK implementation

Here is the platorm-specific information for iOS and Androd:

iOS

In iOS, the following Experience Platform SDK is required:

Sample implementation

Here is the sample implementation for this use case in IOS:

let deliveryId = userInfo["_dId"] as? String
let broadlogId = userInfo["_mId"] as? String
if (deliveryId != nil && broadlogId != nil) {
    ACPCore.trackAction("tracking", data: ["deliveryId": deliveryId!, "broadlogId": broadlogId!, "action":"2"])
}

Android

In Android, the following Experience Platform SDK is required:

Sample implementation

Here is the sample implementation for this use case in Android:

contextData.put("deliveryId", deliveryId);
contextData.put("broadlogId", messageId);
contextData.put("action", "2");
MobileCore.trackAction("tracking", contextData);

Implement a custom event in your mobile app to trigger In-App messages

Here is the information about how to complete this use case:

Required extensions

To configure this use case, you need the following extensions from Experience Platform Launch:

Postbacks

No postbacks are required for this use case.

Experience Platform SDK implementation

Here is the platorm-specific information for iOS and Androd:

iOS

In iOS, the following Experience Platform SDK is required:

Sample implementation

Here is the sample implementation for this use case in IOS:

ACPCore.trackAction(mobileEventName, data: [:] )

Android

In Android, the following Experience Platform SDK is required:

Sample implementation

Here is the sample implementation for this use case in Android:

MobileCore.trackAction(mobileEventText, new HashMap<String,String>());

Track user interaction with In-App messages

Here is the information about how to complete this use case:

Required extensions

To configure this use case, you need the following extensions from Experience Platform Launch:

Postbacks

You need to create rules for the In-App tracking postback. For more information, see In-App Tracking Postbacks.

Experience Platform SDK implementation

Here is the platorm-specific information for iOS and Androd:

iOS

In iOS, there is no required Experience Platform SDK for this use case.

Sample implementation

There is no sample implementation for this use case in IOS.

Android

In Android, there is no required Experience Platform SDK for this use case.

Sample implementation

There is no sample implementation for this use case in Android.

Set linkage fields for additional authentication for the profile template that is based on In-App messages

Here is the information about how to complete this use case:

Required extensions

To configure this use case, you need the following extensions from Experience Platform Launch:

Postbacks

No postbacks are required for this use case.

Experience Platform SDK implementation

Here is the platorm-specific information for iOS and Androd:

iOS

In iOS, the following Experience Platform SDK is required:

Sample implementation

Here is the sample implementation for this use case in IOS:

Set linkage fields

var linkageFields = [String: String]()
linkageFields["cusEmail"] = "john.doe@email.com"
ACPCampaign.setLinkageFields(linkageFields)

Reset linkage fields

ACPCampaign.resetLinkageFields(linkageFields)

Android

In Android, the following Experience Platform SDK is required:

Sample implementation

Here is the sample implementation for this use case in Android:

Set linkage fields

HashMap<String, String> linkageFields = new HashMap<String, String>();
linkageFields.put("cusEmail", "john.doe@email.com");
Campaign.setLinkageFields(linkageFields);

Reset linkage fields

Campaign.resetLinkageFields()

Send the user's location data to segment profiles that are based on the user's location history

Here is the information about how to complete this use case:

Required extensions

To configure this use case, you need the following extensions from Experience Platform Launch:

Postbacks

You need to create rules for the location postback. For more information, see Location postback.

Experience Platform SDK implementation

Here is the platorm-specific information for iOS and Androd:

iOS

In iOS, there is no required Experience Platform SDK for this use case.

Sample implementation

There is no sample implementation for this use case in IOS.

Android

In Android, there is no required Experience Platform SDK for this use case.

Sample implementation

There is no sample implementation for this use case in Android.

Leverage POI events as triggers in local notifications and In-App messages

Here is the information about how to complete this use case:

Required extensions

To configure this use case, you need the following extensions from Experience Platform Launch:

Postbacks

No postbacks are required for this use case.

Experience Platform SDK implementation

Here is the platorm-specific information for iOS and Androd:

iOS

In iOS, there is no required Experience Platform SDK for this use case.

Sample implementation

There is no sample implementation for this use case in IOS.

Android

In Android, there is no required Experience Platform SDK for this use case.

Sample implementation

There is no sample implementation for this use case in Android.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy