Android Question admob ad restriction

Almora

Well-Known Member
Licensed User
Longtime User
hi.
application stopped serving ads.
I don't know how to fix it.
I am using this code. no problem in other applications that use the same code.

B4X:
BannerAd.Initialize2("BannerAd", "ca-app-pub-xxxx/yyyy", 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
   Activity.AddView(BannerAd, 0dip, 100%y - height, 100%x, height)
   BannerAd.LoadAd
   IAd.Initialize("iad", "ca-app-pub-xxxx/yyyy")
   IAd.LoadAd

thanks..
 

Attachments

  • PicsArt_06-22-11.25.07.jpg
    PicsArt_06-22-11.25.07.jpg
    55.7 KB · Views: 241
  • PicsArt_06-22-11.17.04.jpg
    PicsArt_06-22-11.17.04.jpg
    53.2 KB · Views: 295

asales

Expert
Licensed User
Longtime User
This code is Ok.
Maybe the problem is how you to display the ad ("This includes resizing ad frames or hiding Google Ads to discard some of the ads").
Put a screen of your app with the ad.
 
Upvote 0
Top