Android Question does not load the banner!

Carta

Member
Hi everyone, I hope you can help me. I don't know how to fix!

I created an admob account, I connected Firebase. App added (currently on Playstore).

downloaded the google-services.json file and saved in the app folder

created advertising bunner. Later tried to insert id admob test. modified the manifest with the strings found in the forums .. but nothing. The banner does not load !!



link where I got the test ID : https://developers.google.com/admob/android/test-ads

MANIFEST :


AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="30"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)

'End of default text.

CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)
CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)

AddReplacement($ADMOB_APP_ID$, ca-app-pub-3940256099942544~3347511713)



here's how I inserted the banner:


Sub caricaBanner

banner.Initialize("banner","ca-app-pub-3940256099942544/6300978111")
Dim height As Int

If GetDeviceLayoutValues.ApproximateScreenSize < 6 Then
If 100%x > 100%y Then height = 32dip Else height = 50dip
Else
height=90dip
End If

End Sub


then called in activity create: caricaBanner
 

asales

Well-Known Member
Licensed User
Longtime User
This is a old code to banner ad.
Check the updated example and use adaptive banners:
 
Upvote 0
Top