Skip to content

Latest commit

 

History

History
66 lines (54 loc) · 3.9 KB

File metadata and controls

66 lines (54 loc) · 3.9 KB

Messaging

Configuration

Before using messaging feature in the sample app you need to follow the below steps to configure it:

  1. Configure Firebase project for the aep sample app using the firebase documentation
    1. Use com.adobe.marketing.mobile.sampleapp as the package name while creating the firebase android app.
    2. Follow the Firebase documentation to download and overwrite the google-services.json configuration file in the Sample-App/app folder.
  2. Setup Journey Optimizer
  3. Update the ENVIRONMENT_FILE_ID constant value in Sample-App/app/src/java/com/adobe/marketing/mobile/sampleapp/MainApp.Java file with the config app id of the property. For more information on how to get the config app id from Data Collection check this document

Advertising identifier

Configuration

To enable advertising identifier features in the sample app, follow these steps:

  1. Update the value for key gms_ads_app_id located in the secrets.xml at aepsdk-sample-app-android/Sample-App/app/src/main/res/values with a valid Google AdMob app ID.
    • See Google's quick start reference on how to get your AdMob app ID. See step 3 of the Configure your app section for a free public test app ID from Google.
    • Any real key values in the secrets.xml file should not be committed to the repository.
  2. By default, the ad ID features are commented out in the sample app. To enable these features, uncomment the implemention code using find and replace all to replace all instances of:
/* Ad ID implementation

with:

//* Ad ID implementation

Each code block has a pair of block comments wrapped around it to enable this behavior:

/* Ad ID implementation (pt. 1/4)
<commented implementation code...>
/* Ad ID implementation (pt. 1/4) */

After replacement it will become:

//* Ad ID implementation (pt. 1/4)
<active implementation code!>
//* Ad ID implementation (pt. 1/4) */

For convenience, these are the default find and replace shortcuts in Android Studio:
Default shortcuts for find and replace

The shortcut should open a window that looks like the following: Example of find and replace
There should be 4 pairs of special comment blocks (8 total matches) across two files: EdgeIdentityTab.java and app/build.gradle

  1. With the implementation code and gradle files uncommented with new dependencies, sync the project with the Gradle file changes using: File -> Sync Project with Gradle Files

Example of find and replace

The app should now be properly configured to use advertising identifier features.

To disable these features, follow these steps:

  1. Find and replace all instances of:
//* Ad ID implementation

with:

/* Ad ID implementation
  1. Sync Project with Gradle files using: File -> Sync Project with Gradle Files