I am checking FireBaseAd sample from
Below code I change to show the banner ad in a given panel instead of activity, but the banner ad does not show in panel, (works OK in activity)
What is the correct way to achieve it ?
Regards,
Anand
FirebaseAdMob - Admob ads integrated with Firebase backend
Use FirebaseAdMob2 instead: https://www.b4x.com/android/forum/threads/firebaseadmob2-google-mobile-ads-sdk-v20.129609/
www.b4x.com
Below code I change to show the banner ad in a given panel instead of activity, but the banner ad does not show in panel, (works OK in activity)
B4X:
BannerAd.Initialize2("BannerAd", "ca-app-pub-3940256099942544/6300978111", BannerAd.SIZE_SMART_BANNER)
Dim height As Int
If GetDeviceLayoutValues.ApproximateScreenSize < 6 Then
'phones
If 100%x > 100%y Then height = 32dip Else height = 50dip
Else
'tablets
height = 90dip
End If
Log("height" & height)
' Activity.AddView(BannerAd, 0dip, 100%y - height, 100%x, height)
Panel1.AddView(BannerAd, 0dip, 100%y, 100%x, height)
BannerAd.LoadAd
What is the correct way to achieve it ?
Regards,
Anand