Links

Adobe Audience Manager

🚨 Documentation has moved! 🚨

Documentation for Adobe Experience Platform Mobile SDKs now has a new home!
⚠️ This site will no longer be maintained ⚠️
Visit https://developer.adobe.com/client-sdks/ for the latest documentation.
Adobe Audience Manager is a versatile audience data management platform. With the SDK, you can update audience profiles for users and retrieve user segment information from your mobile app. For more information, see Adobe Audience Manager.

Configuring the Audience Manager extension in the Data Collection UI

Adobe Audience Manager Extension Configuration
  1. 1.
    In the Data Collection UI, select the Extensions tab.
  2. 2.
    Choose Catalog, locate the Adobe Audience Manager extension, and select Install.
  3. 3.
    Type your Audience Manager server.
  4. 4.
    Type a timeout value. This value is the period, in seconds, to wait for a response from Audience Manager before timing out. We recommend a default value of 2s.
  5. 5.
    Select Save.
  6. 6.
    Follow the publishing process to update the SDK configuration.

Add Audience Manager to your app

Android
iOS (AEP 3.x)
iOS (ACP 2.x)
React Native

Java

  1. 1.
    Add the library to your project.
  2. 2.
    Import the library.
import com.adobe.marketing.mobile.Audience;
import com.adobe.marketing.mobile.MobileCore;
import com.adobe.marketing.mobile.Identity;
Audience Manager depends on the Identity extension and is automatically included in the Core pod. When manually installing the Audience Manager extension, ensure that you add the identity-1.x.x.aar library to your project.
  1. 1.
    Add the Mobile Core and Audience extensions to your project using Cocoapods.
  2. 2.
    Add the following pods in your Podfile:
    pod 'AEPCore'
    pod 'AEPAudience'
    pod 'AEPIdentity'

Swift

import AEPCore
import AEPAudience
import AEPIdentity

Objective-C

@import AEPCore;
@import AEPAudience;
@import AEPIdentity;
Audience Manager depends on the Identity extension.
  1. 1.
    Add the library to your project via your Podfile by adding pod 'ACPAudience'
  2. 2.
    Import the Audience and Identity library, using the respective language:

Swift

import ACPCore
import ACPAudience

Objective-C

#import "ACPCore.h"
#import "ACPAudience.h"
#import "ACPIdentity.h"
Audience Manager depends on the Identity extension and is automatically included in the Core pod. When installing the Audience Manager extension manually, ensure that you added the libACPIdentity_iOS.a library to your project.
JavaScript
  1. 1.
    Install Audience Manager in your project.
npm install @adobe/react-native-acpaudience
react-native link @adobe/react-native-acpaudience
  1. 1.
    Import the extension.
import {ACPAudience} from '@adobe/react-native-acpaudience';
  1. 1.
    Ensure the extension version is correct.
ACPAudience.extensionVersion().then(version => console.log("AdobeExperienceSDK: ACPAudience version: " + version));

Register Audience Manager with Mobile Core

Android
iOS (AEP 3.x)
iOS (ACP 2.x)
React Native

Java

Call the setApplication() method once in the onCreate() method of your main activity.
For example, your code might look like the following:
public class AudiencetApp extends Application {
@Override
public void onCreate() {
super.onCreate();
MobileCore.setApplication(this);
try {
Audience.registerExtension(); //Register Audience Manager with Mobile Core
Identity.registerExtension();
MobileCore.start(null);
} catch (Exception e) {
//Log the exception
}
}
}

Swift

In your app's _:didFinishLaunchingWithOptions function, register the Audience Manager extension with the Mobile Core:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
MobileCore.registerExtensions([Audience.self, Identity.self], {
MobileCore.configureWith(appId: "yourAppId")
})
...
}

Objective-C

In your app's application:didFinishLaunchingWithOptions function, register the Audience Manager extension with the Mobile Core:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[AEPMobileCore registerExtensions:@[AEPMobileAudience.class, AEPMobileIdentity.class] completion:^{
[AEPMobileCore configureWithAppId: @"yourAppId"];
}];
...
}

Swift

In your app's _:didFinishLaunchingWithOptions function, register the Audience Manager extension with the Mobile Core:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
ACPIdentity.registerExtension()
ACPAudience.registerExtension()
ACPCore.start(nil)
// Override point for customization after application launch.
return true;
}

Objective-C

In your app's application:didFinishLaunchingWithOptions function, register the Audience Manager extension with the Mobile Core:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[ACPIdentity registerExtension];
[ACPAudience registerExtension];
[ACPCore start:nil]
// Override point for customization after application launch.
return YES;
}

JavaScript

import {ACPAudience} from '@adobe/react-native-acpcore';
initSDK() {
ACPAudience.registerExtension();
}

Implement Audience Manager APIs

For more information about implementing Audience Manager APIs, please read the Audience Manager API reference.

Configuration keys

To update SDK configuration programmatically, use the following information to change your Audience Manager configuration values. For more information, see the Configuration API reference.
Key
Required
Description
Data Type
audience.server
Yes
Server endpoint used to collect Audience Manager data
String
audience.timeout
No
Time, in seconds, to wait for a response from Audience Manager before timing out. Default value is 2 seconds.
Integer

Additional information