Hello,
I realized that my app is not triggering mobileads_ready event anymore. I have checkconsentandaddads sub in the code, that sub is triggered, I check via logs but it doesnt get pass the waitfor mobileads_ready.
Is there any way to log what is the problem like mobileads_error ?
edit: I cleared everything on activity create, starter class etc. It is not working. I am going nuts..
Thanks
I realized that my app is not triggering mobileads_ready event anymore. I have checkconsentandaddads sub in the code, that sub is triggered, I check via logs but it doesnt get pass the waitfor mobileads_ready.
Is there any way to log what is the problem like mobileads_error ?
edit: I cleared everything on activity create, starter class etc. It is not working. I am going nuts..
Thanks
B4X:
Private Sub CheckConsentAndAddAds
Log("here") ' this is triggered
Dim m As MobileAds
Wait For (m.Initialize) MobileAds_Ready
LogColor("After MobileAds_Ready", Colors.Magenta)
' builder.AddTestDevice("C2636212A08D5A3629DC75E8D1810196")
Dim jo As JavaObject
jo.InitializeStatic("com.google.android.gms.ads.MobileAds")
jo.RunMethod("setAppMuted", Array(True))
m.SetConfiguration(m.CreateRequestConfigurationBuilder(Array("C2636212A08D5A3629DC75E8D1810196"))) 'optional. Array with test device ids. See unfiltered logs to find correct id.
' ads.ResetConsentStatus
' ads.SetConsentDebugParameters("C2636212A08D5A3629DC75E8D1810196", True) 'same id as above
If ads.GetConsentStatus = "UNKNOWN" Then
Wait For (ads.RequestConsentInformation(False)) Complete (Success As Boolean)
End If
If ads.GetConsentStatus = "REQUIRED" And ads.GetConsentFormAvailable Then
Wait For (ads.ShowConsentForm) Complete (Success As Boolean)
End If
' Log("Consent: " & ads.GetConsentStatus)
LoadAd
End Sub
Last edited: