You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 2, 2023. It is now read-only.
1. Update the `LAUNCH_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.
11
11
For more information on how to get the config app id from launch check this [document](https://experienceleague.adobe.com/docs/launch/using/publish/environments/environments.html?lang=en#mobile-configuration)
12
+
13
+
14
+
# Advertising identifier
15
+
16
+
## Configuration
17
+
To enable advertising identifier features in the sample app, follow these steps:
18
+
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](../Sample-App/app/src/main/res/values/secrets.xml) with a valid Google AdMob app ID.
19
+
- See Google's [quick start reference](https://developers.google.com/admob/android/quick-start) on how to get your AdMob app ID. See step 3 of the [Configure your app](https://developers.google.com/admob/android/quick-start#import_the_mobile_ads_sdk) section for a free public test app ID from Google.
20
+
- Any real key values in the `secrets.xml` file should **not** be committed to the repository.
21
+
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](https://www.jetbrains.com/help/idea/finding-and-replacing-text-in-project.html#replace_search_string_in_project) to replace all instances of:
22
+
```java
23
+
/* Ad ID implementation
24
+
```
25
+
with:
26
+
```java
27
+
//* Ad ID implementation
28
+
```
29
+
Each code block has a pair of block comments wrapped around it to enable this behavior:
30
+
```java
31
+
/* Ad ID implementation (pt. 1/4)
32
+
<commented implementation code...>
33
+
/* Ad ID implementation (pt. 1/4) */
34
+
```
35
+
36
+
After replacement it will become:
37
+
```java
38
+
//* Ad ID implementation (pt. 1/4)
39
+
<active implementation code!>
40
+
//* Ad ID implementation (pt. 1/4) */
41
+
```
42
+
43
+
For convenience, these are the default find and replace shortcuts in Android Studio:
44
+
[<imgsrc="./assets/find-and-replace-shortcuts.png"alt="Default shortcuts for find and replace"width="500"/>](./assets/find-and-replace-shortcuts.png)
45
+
46
+
The shortcut should open a window that looks like the following:
47
+
[<imgsrc="./assets/find-and-replace-all-example.png"alt="Example of find and replace"width="500"/>](./assets/find-and-replace-all-example.png)
48
+
There should be 4 pairs of special comment blocks (8 total matches) across two files:
49
+
`EdgeIdentityTab.java` and `app/build.gradle`
50
+
51
+
3. 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
52
+
53
+
[<imgsrc="./assets/sync-project-gradle-example.png"alt="Example of find and replace"width="500"/>](./assets/sync-project-gradle-example.png)
54
+
55
+
The app should now be properly configured to use advertising identifier features.
56
+
57
+
To **disable** these features, follow these steps:
58
+
1.[Find and replace](https://www.jetbrains.com/help/idea/finding-and-replacing-text-in-project.html#replace_search_string_in_project) all instances of:
59
+
```java
60
+
//* Ad ID implementation
61
+
```
62
+
with:
63
+
```java
64
+
/* Ad ID implementation
65
+
```
66
+
2. Sync Project with Gradle files using: File -> Sync Project with Gradle Files
@@ -93,4 +95,10 @@ public void onComplete(@NonNull Task<String> task) {
93
95
Log.e(LOG_TAG, "IllegalArgumentException - Check if google-services.json is added and is correctly configured. \nError message: " + e.getLocalizedMessage());
0 commit comments