Android Question Admob Ad not showing.

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi All,

I configured ad in firebase and got id from Admob account. The sample ad is showing but the actual one is not showing up.
Is there any reason. In the code below
B4X:
'Admob
    BannerAd.Initialize2("BannerAd", "ca-app-pub-xxxxxxx/xxxxxx", 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/xxxxx")
    IAd.LoadAd

    If IAd.Ready Then IAd.Show

in the last line iAd.Ready comes false

Am i missing something.

Pls give some clue.

Thanks
Juzer
 

asales

Expert
Licensed User
Longtime User
If you search in the forum to "Admob not show", you will find several posts related to this issue. Check if some of them can help you.

Check this example too:
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi asales,

I had already checked but could not solve it.
Your stuff I saw now only, I will study it.

Thanks a lot.

Juzer
 
Upvote 0
Top