Mobile use cases supported in Adobe Campaign Standard mobile-use-cases
In this page, you will find the list of every mobile use cases supported in Adobe Campaign Standard using the Adobe Experience Platform SDKs. Note that supporting these use cases involve installing and configuring the Adobe Experience Platform SDKs, tags in Adobe Experience Platform, and Adobe Campaign Standard. For more information on this, refer to this page.
Adobe Campaign Standard supports the following use cases:
- Register a mobile profile in Campaign Standard
- Send a push token to Campaign Standard
- Enrich a mobile profile with custom data from your application
- Enrich a mobile profile with Lifecycle data from your application
- Track user interaction with Push notifications
- Implement a custom event in your mobile app to trigger In-App messages
- Set linkage fields for additional authentication for the profile template that is based In-App messages
To configure these use cases, you need the following extensions:
- Adobe Campaign Standard
To install and configure the Campaign Standard extension, see Configure the Campaign Standard extension in the Data Collection UI. - 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.
Register a mobile profile in Campaign Standard register-mobile-profile
With iOS register-mobile-profile-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.
Here is a sample implementation of this use case with 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)
}
With Android register-mobile-profile-android
In Android, the following Experience Platform APIs are required:
- OnResume
- OnPause
For more information, see Lifecycle extension in Android.
Here is a sample implementation for this use case with 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 Adobe Campaign Standard send-push-token
With iOS send-push-token-ios
In iOS, the following Experience Platform SDK is required:
- setPushIdentifier
For more information, see setPushIdentifier.
Here is the sample implementation for this use case with iOS:
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
// Register Device Token
ACPCore.setPushIdentifier(deviceToken)
With Android send-push-token-android
In Android, the following Experience Platform SDK is required:
- setPushIdentifier
For more information, see setPushIdentifier.
Here is the sample implementation for this use case with 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 application enrich-mobile-profile-custom
For this use case to work, you need to create rules for PII postbacks. For more information, see PII Postbacks.
With iOS enrich-mobile-profile-custom-ios
In iOS, the following Experience Platform API is required:
- collectPII
For more information, see collectPII.
Here is a sample implementation of this use case with iOS:
ACPCore.collectPii(["pushPlatform":"apns", "email":email, "firstName":firstName, "lastName":lastName])
With Android enrich-mobile-profile-custom-android
In Android, the following Experience Platform API is required:
- collectPII
For more information, see collectPII.
Here is a sample implementation for this use case with Android:
HashMap<String, String> data = new HashMap<>();
data.put("pushPlatform", "gcm");
data.put("firstName", firstNameText);
data.put("lastName", lastNameText);
data.put("email", emailText);
MobileCore.collectPii(data);
Enrich a mobile profile with Lifecycle data from your application enrich-mobile-profile-lifecycle
For this use case to work, you need to create rules for PII postbacks. For more information, see PII Postbacks.
With iOS enrich-mobile-profile-lifecycle-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.
Here is a sample implementation of this use case with 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)
}
With Android enrich-mobile-profile-lifecycle-android
In Android, the following Experience Platform APIs are required:
- OnResume
- OnPause
For more information, see Lifecycle extension in Android.
Here is a sample implementation for this use case with 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 track-user-push
You need to create rules for push notifications tracking postback. For more information, see Push notifications tracking postback.
With iOS track-user-push-ios
In iOS, the following Experience Platform SDK is required:
- trackAction. For more information, see Track app actions.
Here is a sample implementation of this use case with 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"])
}
With Android track-user-push-android
In Android, the following Experience Platform SDK is required:
- trackAction
For more information, see Track app actions.
Here is a sample implementation for this use case with Android:
contextData.put("deliveryId", deliveryId);
contextData.put("broadlogId", messageId);
contextData.put("action", "2");
MobileCore.trackAction("tracking", contextData);
Implement a custom event in your application to trigger In-App messages custom-event-inapp
With iOS custom-event-inapp-ios
In iOS, the following Experience Platform SDK is required:
- trackAction. For more information, see Track app actions.
Here is a sample implementation of this use case with iOS:
ACPCore.trackAction(mobileEventName, data: [:] )
With Android custom-event-inapp-android
In Android, the following Experience Platform SDK is required:
- trackAction
For more information, see Track app actions.
Here is a sample implementation for this use case with Android:
MobileCore.trackAction(mobileEventText, new HashMap<String,String>());
Set linkage fields for additional authentication linkage-fields-inapp
With iOS linkage-fields-inapp-ios
To set linkage fields for additional authentication for the profile template that is based on In-App messages in iOS, the following Experience Platform SDK is required:
- Set linkage fields
For more information, see Set linkage fields. - Reset linkage fields
For more information, see Reset linkage fields.
Here is are sample implementations of this use case with iOS.
To set linkage fields:
var linkageFields = [String: String]()
linkageFields["cusEmail"] = "john.doe@email.com"
ACPCampaign.setLinkageFields(linkageFields)
To reset linkage fields:
ACPCampaign.resetLinkageFields(linkageFields)
With Android linkage-fields-inapp-android
To set linkage fields for additional authentication for the profile template that is based on In-App messages in Android, the following Experience Platform SDK is required:
- Set linkage fields
For more information, see Set linkage fields. - Reset linkage fields
For more information, see Reset linkage fields.
Here is are sample implementations of this use case with Android.
To set linkage fields:
HashMap<String, String> linkageFields = new HashMap<String, String>();
linkageFields.put("cusEmail", "john.doe@email.com");
Campaign.setLinkageFields(linkageFields);
To reset linkage fields:
Campaign.resetLinkageFields()