Hi,
I started using FirebaseAdMob2 - Google Mobile Ads SDK 20+ as instructed: https://www.b4x.com/android/forum/threads/firebaseadmob2-google-mobile-ads-sdk-v20.129609/#content and my banners cut (horizontal and vertical).
Video below:
B4A Version 10.90
Thanks for any suggestions.
I started using FirebaseAdMob2 - Google Mobile Ads SDK 20+ as instructed: https://www.b4x.com/android/forum/threads/firebaseadmob2-google-mobile-ads-sdk-v20.129609/#content and my banners cut (horizontal and vertical).
B4X:
Sub GetAdaptiveAdSize As Map
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim AdSize As JavaObject
Dim width As Int = 100%x / GetDeviceLayoutValues.Scale
Dim Native As JavaObject = AdSize.InitializeStatic("com.google.android.gms.ads.AdSize").RunMethod("getCurrentOrientationAnchoredAdaptiveBannerAdSize", Array(ctxt, width))
Return CreateMap("native": Native, "width": Native.RunMethod("getWidthInPixels", Array(ctxt)), _
"height": Native.RunMethod("getHeightInPixels", Array(ctxt)))
End Sub
Sub position_banner
Dim AdaptiveSize As Map = GetAdaptiveAdSize
Dim height As Int = AdaptiveSize.Get("height")
Activity.AddView(BannerAd, 0, (100%y - height), AdaptiveSize.Get("width"), height)
BannerAd.LoadAd
BannerAd.BringToFront
End Sub
Video below:
B4A Version 10.90
Thanks for any suggestions.