I hope you are well.
Is valid adding npa 0 in the bundle to request personalized ads or we need to make another object for this?
According to the documentation what it says here Forward consent to the Google Mobile Ads SDK
This is for request non-personalized ads
Bundle extras = new Bundle();
extras.putString("npa", "1");
AdRequest request = new AdRequest.Builder()
.addNetworkExtrasBundle(AdMobAdapter.class, extras)
.build();
According to the documentation it says:
If non-personalized ads are requested, the ad request URL currently includes &npa=1. However, note that this is an internal implementation detail of the Google Mobile Ads SDK and is subject to change.
If i want to request personalized ads i can put 0?
Bundle extras = new Bundle();extras.putString("npa", "0");
Thanks in advance
If you want to request personalized ads, there is no need to use addNetworkExtrasBundle()
.
Simply use,
AdRequest.Builder builder = new AdRequest.Builder();
if (/*Request non-personalized ads*/) {
Bundle extras = new Bundle();
extras.putString("npa", "1");
builder.addNetworkExtrasBundle(AdMobAdapter.class, extras);
}
AdRequest request = builder.build();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With