1. Home
  2. Docs
  3. Your Recipes App
  4. Android Studio
  5. AdMob & GDPR

AdMob & GDPR

Enable Ads

  1. to enable or disable ads, you can see on the Config.java file
  2. set “true” value to enable ads or set “false” value to disable ads.
public static final boolean ENABLE_ADMOB_BANNER_ADS = true;
public static final boolean ENABLE_ADMOB_INTERSTITIAL_ADS = true;

 

Change AdMob Banner & Interstitial Unit ID

  1. Login to your AdMob account, create an app and generate your ad unit id
  2. Change the ID in res/value/string.xml
<string name="admob_banner_unit_id">ca-app-pub-3940256099942544/6300978111</string>
<string name="admob_interstitial_unit_id">ca-app-pub-3940256099942544/1033173712</string>

 

What is GDPR ?​

To comply GDPR regulation you must configure some data :

Admob publisher ID
Here how you can found your admob publisher id : https://support.google.com/admob/answer/2784578?hl=en​
Then change publisher Id in res/value/string.xml

<string name="admob_publisher_id">pub-3940256099942544</string>

Privacy Policy Url
To meet GDPR regulation you also must provide your own privacy and policy url, you can use generator like this : https://app-privacy-policy-generator.firebaseapp.com/ or you can use other tools, after generate you can upload into your hosting or anywhere so user can view it.

Then please change privacy_policy_url in res/value/string.xml

<string name="privacy_policy_url">https://www.solodroid.net/privacy.......</string>