Android Question Strange problem with Admob - Receive OK but not appear

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
Everyone,

Somebody has problem with Admob

In one of my apps I have the admob... It´s working in almost all devices I have, but in Samsungs is something strange behavior:

I receive the event "ReceiveAd" but in screen not appear the ad! Strange this no? I tested in a samsung tablet, samsung S5 but not got any error and no ad visible.

And I colorize to blue to see where is the adview and is in the same place, I don´t know why not appear.

Do you have this problem before?

PS: I have the last google play services updated

Thanks

Alberto Iglesias
 

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
Finally I found the problem! Is in the size of adview object, look.


In the Original sample we have:
B4X:
Activity.AddView(AdView1, 0dip, 0dip, 320dip, 50dip)' AdView1.LoadAd 'loads an ad

and looking a deep in a unfiltered log I got this message:

Not enough space to show ad. Needs 360x50 dp, but only has 320x50 dp.

so, just change to:

B4X:
Activity.AddView(AdView1, 0dip, 0dip, 100%x, 50dip)' AdView1.LoadAd 'loads an ad


and works!
 
Upvote 0
Top