To add your app to your dataset in the Personalization UI, do the following.
Log in to the Personalization UI and select the desired dataset.
For an initial integration, we recommend using a non-production dataset.
From the left-hand menu, choose Mobile > Native App Setup.
If this feature is disabled for your dataset, contact the Personalization support team to enable it.
In the Platform dropdown menu, select Android.
Enter a name for your app under App Name.
Enter the Android
applicationId(from the app's
build.gradle) under ApplicationId.
Click Create New App.
To add the Personalization SDK to your app, do the following.
In your project-level
mavenCentral()in your repository list, as shown in the following example.
In your app's module-level
build.gradlefile, include the latest version of Personalization as a dependency, as shown in the following example.
For sample code to call in your
Application.onCreate() implementation to initialize and start the Personalization SDK, see the
Evergage class documentation.
To effortlessly manage test campaigns from the device in debug/debuggable builds, you must configure the app to use its Personalization-generated URL Scheme. For more information, see
You can use other methods to add information about the user. In the initialization example code, calling
setUserId provides Personalization with the user's authenticated ID. If the user's ID is unknown at startup, you could call this method later to then send the user's ID with subsequent events.
Only supported by recent versions of Android Studio and Gradle.
Android Studio automatically downloads and attaches the Personalization Android SDK sources. Press the Command key (OSX) or Ctrl key (Windows) and click a non-internal Personalization class or method to go to the declaration and view the source.
If sources were not automatically added, you could manually attach the
-sources.jar by doing the following.
- Download the
-sources.jarfrom Maven Central.
- On the left sidebar, open the Project Pane and select the Project view from the dropdown menu. The default view is Android.
- Under External Libraries, right-click the Personalization library (evergage-android-sdk-1.3.1) and select Library Properties.
- Click the + icon in the bottom left corner.
- Select the downloaded JAR file and click OK.
You can follow the same steps to attach the
-javadoc.jar file and view the documentation locally. You could also view the documentation locally by downloading the
-javadoc.jar from Maven Central and opening
- To get started with tracking events and sending them from your app to Personalization, see Tracking.