Android Tutorial FirebaseAdMob and User Consent

Status
Not open for further replies.

sorex

Expert
Licensed User
Longtime User
Then this is absurd. Why would anyone decrease the number of providers and decrease their income.

I doubt using admob without mediation shows anything else than admob banners.

They probably are the market leader in web/mobile marketing so I doubt you'll lose much (if any) when you only select 12 extra.
 
D

Deleted member 103

Guest
Hi,
does this option have to be implemented in the app settings?
You can change your choice anytime for App Name in the app settings.
 

tufanv

Expert
Licensed User
Longtime User
I can confirm that , no income drop yet for around 2m impressions / week.
 

sorex

Expert
Licensed User
Longtime User
My guess is that they had enough work to make all their web apps GDPR proof so the next step will be adding limitation to their admob backend to prevent ad feeding to those that didn't have the consent sdk implemented.
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
I doubt using admob without mediation shows anything else than admob banners.

They probably are the market leader in web/mobile marketing so I doubt you'll lose much (if any) when you only select 12 extra.

That might be the case for banners, but it isn't for interstitials in my apps. If you want to find out for sure which providers your revenue is coming from, go to your AdSense (not AdMob) account, then click on Performance Reports->Advanced Reports->Ad Networks. You will get a list showing you the revenue from all the ad networks serving ads in your apps. In my case, the top 11 non-Google providers account for about 10% of my revenue.

- Colin.
 
Last edited:

SMOOTSARA

Active Member
Licensed User
Longtime User
Hello guys

I sometimes encounter this error (pic1)

and my cod is :

B4X:
'load ads:
Sub Load_Ad

    AdRequestBuilder1.Initialize

    Log("consent.IsRequestLocationIn Eea Or Unknown ==> "&consent.IsRequestLocationInEeaOrUnknown)

    If consent.IsRequestLocationInEeaOrUnknown Then
        If consent.ConsentState = consent.STATE_NON_PERSONALIZED Then
            AdRequestBuilder1.NonPersonalizedAds
        Else if consent.ConsentState = consent.STATE_UNKNOWN Then
            Return
        End If
    End If
   
    RewardedVideoAd_1.LoadAdWithBuilder(CodeModule.Ad_unit_ID,AdRequestBuilder1)

End Sub
 

Attachments

  • 1.PNG
    111.4 KB · Views: 547
  • 2.PNG
    60.2 KB · Views: 528

Computersmith64

Well-Known Member
Licensed User
Longtime User
It looks like your consent object is uninitialized. Where are you declaring it?

- Colin.
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
Try declaring it in your Starter service.

- Colin.
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
Try declaring it in your Starter service.

- Colin.
Or if you leave it declared in your activity, check that it's initialized in your Activity_Resume & if it's not, then re-initialize it. If you do this though, you will also have to call getConsent again, otherwise when you do your check of consent.ConsentState it will not contain a valid value.

Your best option is to declare it in the Starter service - then you only have to initialize & call getConsent once, plus you won't have to check the initialization state of it (assuming you aren't calling ExitApplication anywhere).

- Colin.
 

eps

Expert
Licensed User
Longtime User
Well that was painful!

I needed to go to here : https://adexchanger.com/online-adve...-will-limit-publishers-to-12-ad-tech-vendors/

and here : https://stackoverflow.com/questions...rm-can-be-used-with-custom-provider-selection

To understand and find the items I needed to update to get Rewarded Ads working.

The annoying thing is that the Demo Rewarded Ad worked but then I needed to bolt on a whole set of consents and forms and options and settings and and and..! Oh well, at least it's all clear now...

I'll try and put together an 'idiots' guide to all of this, but of course it changes quite significantly..
 

eps

Expert
Licensed User
Longtime User
Actually.... Can we not avoid having to request permission to show Rewarded Ads? Golf Clash didn't ask me if I minded getting Rewarded Ads.... I guess they're using a different service?
 

Gunther

Active Member
Licensed User
Longtime User
Hello,

I am getting a "FirebaseAuthRegistrar is not an found". I am not using this lib but the necessary Manifest settings are done for Firebase.

Manifest part: it doesn't make a difference if FirebaseAuth.FirebaseAuth is enabled or not.

Nevertheless no Consent Form is displayed.

B4X:
'
' ############# Google Play Services and Ads and Firebase ################
'
' Google Play Services Base - Always required when using Google Play Services or Firebase:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
'
' Firebase - Always required when using Firebase
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
'
' Firebase Notifications / Push messages
'CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
'
' Firebase Analytics
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
'
' Firebase Ads
CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)
'
' Firebase Auth
'CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)
'
' #######################################################################
'


In the Starter Service
B4X:
    consent.Initialize("consent")
    LogColor("***Request state!*** ",  4287889619)
    consent.AddTestDevice("557E8FB9CEF9419114223BE9E601FB61") ' my ID
    consent.SetDebugGeography(True) 'comment for regular operation
'    consent.RequestInfoUpdate(Array("pub-144444444"))
    consent.RequestInfoUpdate(Array("pub-xxxxxxxxxxxxxxxxxx"))
    LogColor("***Request done!*** ",  4287889619)
    Wait For consent_InfoUpdated (Success As Boolean)
    If Success = False Then
        Log($"Error getting consent state: ${LastException}"$)
    End If
    LogColor($"Consent state: ${consent.ConsentState}"$,  4287889619)
    LogColor("EU: " & consent.IsRequestLocationInEeaOrUnknown, 4287889619)
  
    Do While IsPaused(Main)
        Sleep(100)
    Loop
  
   CallSubDelayed(Main, "ConsentStateAvailable")

So, it tells me:

This request is sent from a test device.
Consent state: UNKNOWN
EU: true

which is ok so far.

B4X:
Class com.google.firebase.auth.FirebaseAuthRegistrar is not an found.
java.lang.ClassNotFoundException: com.google.firebase.auth.FirebaseAuthRegistrar
    at java.lang.Class.classForName(Native Method)
    at java.lang.Class.forName(Class.java:453)
    at java.lang.Class.forName(Class.java:378)
    at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@16.0.4:78)
    at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@16.0.4:71)
    at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.0.4:532)
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.4:355)
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.4:324)
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.4:310)
    at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@16.0.4:53)
    at android.content.ContentProvider.attachInfo(ContentProvider.java:1927)
    at android.content.ContentProvider.attachInfo(ContentProvider.java:1902)
    at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@16.0.4:47)
    at android.app.ActivityThread.installProvider(ActivityThread.java:6572)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:6127)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6037)
    at android.app.ActivityThread.-wrap1(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
    at android.os.Handler.dispatchMessage(Handler.java:105)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6938)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.FirebaseAuthRegistrar" on path: DexPathList[[zip file "/data/app/twinnypoints.gg.goilsoft.de-wrnOsIWW084ssHTR3bLaUw==/base.apk"],nativeLibraryDirectories=[/data/app/twinnypoints.gg.goilsoft.de-wrnOsIWW084ssHTR3bLaUw==/lib/arm64, /system/lib64, /vendor/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    ... 24 more
Class com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar is not an found.
java.lang.ClassNotFoundException: com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar
    at java.lang.Class.classForName(Native Method)
    at java.lang.Class.forName(Class.java:453)
    at java.lang.Class.forName(Class.java:378)
    at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@16.0.4:78)
    at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@16.0.4:71)
    at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.0.4:532)
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.4:355)
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.4:324)
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…