Oualid Bencharki
Oualid Bencharki

Reputation: 47

How to show ads in other activities based on the user choice from the GDPR consent form?

I have just integrated Admob GDPR Consent SDK in my project, and the form shows correctly, my question is how to show ads in other activities based on user choice, because the choice is made in the MainActivity, for example if the user choose to see only non personalized ads, how I will show non personalized ads in other activities, does Google do it automatically or I have to use the following code to show non personalized ads every time :

Bundle extras = new Bundle();
extras.putString("npa", "1");

AdRequest request = new AdRequest.Builder()
        .addNetworkExtrasBundle(AdMobAdapter.class, extras)
        .build();

Upvotes: 0

Views: 99

Answers (1)

Kasiopeous
Kasiopeous

Reputation: 196

You have to add the extras bundle to each ad request if you want for the non-personalization option to apply.

Upvotes: 0

Related Questions