From 72fd642119fc68aa06509c5d84f219b4bbfbf948 Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Tue, 22 May 2018 13:53:34 -0700 Subject: [PATCH] Get consent for ads to comply with the GDPR. https://redmine.stoutner.com/issues/278 --- .idea/dictionaries/soren.xml | 2 + app/build.gradle | 11 +- .../assets/de/about_privacy_policy_dark.html | 6 +- .../assets/de/about_privacy_policy_light.html | 6 +- .../assets/en/about_privacy_policy_dark.html | 9 +- .../assets/en/about_privacy_policy_light.html | 9 +- .../assets/es/about_privacy_policy_dark.html | 12 +- .../assets/es/about_privacy_policy_light.html | 12 +- .../assets/it/about_privacy_policy_dark.html | 6 +- .../assets/it/about_privacy_policy_light.html | 6 +- .../assets/ru/about_privacy_policy_dark.html | 9 +- .../assets/ru/about_privacy_policy_light.html | 9 +- .../com/stoutner/privacybrowser/BannerAd.java | 98 ------------ .../dialogs/AdConsentDialog.java | 107 +++++++++++++ .../privacybrowser/helpers/AdHelper.java | 140 ++++++++++++++++++ app/src/free/res/values/strings.xml | 13 +- .../assets/de/guide_tracking_ids_dark.html | 16 +- .../assets/de/guide_tracking_ids_light.html | 16 +- .../main/assets/de/images/advertising_id.png | Bin 86872 -> 0 bytes .../assets/en/guide_tracking_ids_dark.html | 16 +- .../assets/en/guide_tracking_ids_light.html | 18 +-- .../main/assets/en/images/advertising_id.png | Bin 79458 -> 0 bytes .../assets/es/guide_tracking_ids_dark.html | 17 --- .../assets/es/guide_tracking_ids_light.html | 17 --- .../main/assets/es/images/advertising_id.png | Bin 88585 -> 0 bytes .../assets/it/guide_tracking_ids_dark.html | 16 -- .../assets/it/guide_tracking_ids_light.html | 16 -- .../main/assets/it/images/advertising_id.png | Bin 82423 -> 0 bytes .../assets/ru/guide_tracking_ids_dark.html | 16 -- .../assets/ru/guide_tracking_ids_light.html | 16 -- .../main/assets/ru/images/advertising_id.png | Bin 104472 -> 0 bytes .../activities/MainWebViewActivity.java | 65 ++++---- .../EditBookmarkDatabaseViewDialog.java | 12 +- .../main/res/menu/webview_options_menu.xml | 6 + app/src/main/res/values/strings.xml | 5 +- .../dialogs/AdConsentDialog.java | 26 ++++ .../{BannerAd.java => helpers/AdHelper.java} | 16 +- 37 files changed, 407 insertions(+), 342 deletions(-) delete mode 100644 app/src/free/java/com/stoutner/privacybrowser/BannerAd.java create mode 100644 app/src/free/java/com/stoutner/privacybrowser/dialogs/AdConsentDialog.java create mode 100644 app/src/free/java/com/stoutner/privacybrowser/helpers/AdHelper.java delete mode 100644 app/src/main/assets/de/images/advertising_id.png delete mode 100644 app/src/main/assets/en/images/advertising_id.png delete mode 100644 app/src/main/assets/es/images/advertising_id.png delete mode 100644 app/src/main/assets/it/images/advertising_id.png delete mode 100644 app/src/main/assets/ru/images/advertising_id.png create mode 100644 app/src/standard/java/com/stoutner/privacybrowser/dialogs/AdConsentDialog.java rename app/src/standard/java/com/stoutner/privacybrowser/{BannerAd.java => helpers/AdHelper.java} (75%) diff --git a/.idea/dictionaries/soren.xml b/.idea/dictionaries/soren.xml index 26e198d8..57f65499 100644 --- a/.idea/dictionaries/soren.xml +++ b/.idea/dictionaries/soren.xml @@ -63,6 +63,7 @@ fontsize framelayout freitas + gdpr gerlach gitweb googleplay @@ -105,6 +106,7 @@ referer refreshlayout relativelayout + remarketing requery roadmap robinlinus diff --git a/app/build.gradle b/app/build.gradle index 85c0ba70..fdd6ec35 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -67,11 +67,10 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:design:27.0.2' - // Only compile `com.google.firebase:firebase-ads` for the free flavor. + + // Only compile Firebase ads for the free flavor. freeImplementation 'com.google.firebase:firebase-ads:15.0.1' -} -// Google's documentation says the following line is required for `firebase-ads` but things work correctly without it. -// I have no interest in applying the Google Mobile Services plugin in the standard flavor if I don't have to. -// I suspect that in the free flavor `firebase-ads` applies it even when not specified. . -// apply plugin: 'com.google.gms.google-services' \ No newline at end of file + // Only compile the consent library for the free flavor. It is used to comply with the GDPR in Europe. + freeImplementation 'com.google.android.ads.consent:consent-library:1.0.0' +} \ No newline at end of file diff --git a/app/src/free/assets/de/about_privacy_policy_dark.html b/app/src/free/assets/de/about_privacy_policy_dark.html index 3570de83..5fb1977d 100644 --- a/app/src/free/assets/de/about_privacy_policy_dark.html +++ b/app/src/free/assets/de/about_privacy_policy_dark.html @@ -78,8 +78,8 @@

Advertisements

Privacy Browser Free displays a banner ad across the bottom of the screen using Google's AdMob network, which has its own privacy policy. - Note that unless you have opted out of interest-based ads, - the advertiser will receive a copy of your unique device advertising ID, which allows them to track your device across apps. + These ads are set to be non-personalized and the user is flagged as being under the age of consent, + which removes all tracking and remarketing. AdMob reports anonymized summaries of the following information to developers.