Android Tutorial FirebaseAdMob and User Consent

Status
Not open for further replies.

kisoft

Well-Known Member
Licensed User
Longtime User
I live in Poland, I have not implemented it yet. Nothing seems to be happening. The other ads are still displayed.
 

kisoft

Well-Known Member
Licensed User
Longtime User
I just installed 20 different applications on my phone. None of them asked for permission to display personalized ads. Other ads are displayed normally.
 

asales

Expert
Licensed User
Longtime User
I just installed 20 different applications on my phone. None of them asked for permission to display personalized ads. Other ads are displayed normally.
Good to know.
Please, keep us informed.
 

abhishek007p

Active Member
Licensed User
Longtime User
1. minimum supported B4A version, play service version needed for this?
2. does it also work with 'Lite' version of FireBase AdMob??, since most of my apps are using lite version.
3. what will happen to older apps not yet updated? ads will continue to displayed or ads will stop showing?
4. i only use AdMob without mediation, can i use the default google consent dialogs.
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. Use B4A Sdk Manager and make sure that everything is updated. B4A v7.8+ is supported (might work with older versions as well).
2. It works with FirebaseAdMob. It was not tested with any other implementation.
3. Better consult with Google about this. As I understand it everything will work but you will not meet the new law requirements.
4. Yes, but you need to first update the list of ad technology providers as explained in the tutorial.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Updated the LoadAd code to not load anything if the user is in EU and the consent state is unknown.

This is more correct based on Google documentation:
"Ads served by Google can be categorized as personalized or non-personalized, both requiring consent from users in the EEA."

B4X:
Sub LoadAd
   Dim builder As AdRequestBuilder
   builder.Initialize
   Dim consent As ConsentManager = Starter.consent
   If consent.IsRequestLocationInEeaOrUnknown Then
       If consent.ConsentState = consent.STATE_NON_PERSONALIZED Then
           builder.NonPersonalizedAds
       Else if consent.ConsentState = consent.STATE_UNKNOWN Then
           Return
       End If
   End If
   builder.AddTestDevice("D4AC977CA12D122C4563730CC762C302")
   adview1.LoadAdWithBuilder(builder)
End Sub
 

R D Boozer

Member
Licensed User
Is there away to make an app be unavailable in the app store in the EU whilst still selling it elsewhere? The app I'm about to release would primarily be of interest to North Americans anyway.
 

npsonic

Active Member
Licensed User
Is there away to make an app be unavailable in the app store in the EU whilst still selling it elsewhere? The app I'm about to release would primarily be of interest to North Americans anyway.
You select countries when you are publishing your app. Just select United States leave everything else empty.
 

R D Boozer

Member
Licensed User
You select countries when you are publishing your app. Just select United States leave everything else empty.
Thanks! Obviously, this will be my first Android app, though I started my software engineer career about 40 years ago. Again, your quick and candid response is much appreciated!
 

sorex

Expert
Licensed User
Longtime User
thanks for supporting us with this, Erel.

I can see the 'pop-up' so I guess it works fine. (still need to test both modes)

What I can see is that an anywhere software icon also appears on my own test app.

Can this be replaced with our own app icon?
 

sorex

Expert
Licensed User
Longtime User
you're right, my bad.

I copied a B4A file to a new folder to work from and I didn't copy the /objects/res/drawable/icon.png image so it placed what I saw in your screenshot.
 

chris ash

Member
Licensed User
Longtime User
I am going to ask what is probably a really daft question...

But I'm not sure so I will ask anyway... How does this apply to interstitial and rewarded ads??

And how would you set them to fire or not with the same restraints as above? (A sample code snippet would be useful)

Thanks in advance
CAsh
 

sorex

Expert
Licensed User
Longtime User
you can see a modded loadAd sub in the first post.

just change the ad load to interstitial like this

B4X:
adInterstitial.LoadAdWithBuilder(builder)
 

sorex

Expert
Licensed User
Longtime User

tufanv

Expert
Licensed User
Longtime User
if we are also using interstitial ads , we need to add
iad.LoadAdWithBuilder(builder) under
adview1.LoadAdWithBuilder(builder)

right ?
 
D

Deleted member 103

Guest
B4X:
Sub ConsentStateAvailable
   Dim consent As ConsentManager = Starter.consent
   If consent.ConsentState = consent.STATE_UNKNOWN And consent.IsRequestLocationInEeaOrUnknown Then
       'Set last parameter to False if you don't want to show the "pay for ad-free" option.
       'Change privacy policy URL.
       consent.ShowConsentForm("https://www.mysite.com/privacy.html", True, True, True)
       Wait For Consent_FormResult (Success As Boolean, UserPrefersAdFreeOption As Boolean)
       If Success Then
           Log($"Consent form result: ${consent.ConsentState}, AdFree: ${UserPrefersAdFreeOption}"$)
       Else
           Log($"Error: ${LastException}"$)
       End If
   End If
   LoadAd
End Sub

At the App-start I get this message:
This means that if you do not set the Admob settings to "Custom set of ad technology providers", this dialog will not be displayed and no further step is necessary?

Or did I not understand something again?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…