Newer Version Available
Let us know so we can improve!
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.
Note
Click Settings and then + App.
If this feature is disabled for your dataset, contact the Personalization support team to enable it.
Note
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.
You can add up to 8 native apps to a single dataset. However, deleting an app doesn’t free up space for a new one.
Important
To add the Personalization SDK to your app, do the following.
In your project-level build.gradle file, include "https://maven.google.com" and mavenCentral() in your repository list, as shown in the following example.
1repositories {
2 // ... existing repositories like jcenter() etc
3 mavenCentral()
4 maven {
5 // For nullability annotations from Android Support Library
6 // See https://developer.android.com/topic/libraries/support-library/setup.html
7 url "https://maven.google.com"
8 }
9}In your app’s module-level build.gradle file, include the latest version of Personalization as a dependency, as shown in the following example.
1dependencies {
2 // ... existing dependencies
3 compile('com.evergage.android:evergage-android-sdk:1.2.3@aar') { transitive = true }
4}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 EvergageActivity.
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.
Note
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.
-sources.jar from Maven Central.You can follow the same steps to attach the -javadocs.jar file and view the documentation locally. You could also view the documentation locally by downloading the -javadocs.jar from Maven Central and opening index.html.
Newer Version Available