Skip to content

Latest commit

 

History

History
 
 

Documentation

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

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-edgeidentity-android/code/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 5 pairs of special comment blocks (10 total matches) across two files: app/build.gradle, CustomIdentityFragment.kt, and SharedViewModel.kt

  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