开发者

Admob in Samsung Galaxy Tab

I'm have 开发者_运维百科an app with admob banner in it, it works fine in Android SDk emulator, but when i test it in my Galaxy tab, the admob banner doesn't come up... but it does show in emulator..


I don't know if you figured it out yet, but i've come upon the same problem (we are talking the old 7 inch Tab here of course); I noticed that AdSize.BANNER works, AdSize.IAB_BANNER doesn't show in portrait, only in landscape; when I manually set the width of the Ad to 600 (which is the actual width), it still doesn't show.

Therefore looked at the docs and guide, and according to the guide:

The SDK will request whatever size the requesting AdView was instantiated with. If there isn't enough space on the device's screen to display the ad, nothing will be shown.

So why doesn't the AdSize.IAB_BANNER work while its 468 wide according to the documentation? It is because AdMob applies density calculations on top, and since the Tab is high density, banner size gets multiplied by 1.5 such that the actual size is 702, which exceeds 600 and thus nothing will get shown.

You can manually set a width of 400, then it will fill the Ad with what size it can fit, being a banner of size Adsize.BANNER.


Did you download Samsung Galaxy Tab SDK and ran the project with that emulator?. In any ways, i think your problem is related to different screen resolutions. Try to run your Android emulator in a wider screen and you will be able to reproduce the problem on your development environment too.

Otherwise, please add some code to your question.

Ger


It's difficult to answer here. can you please post your code snippet.

I guess you are using test device as emulator. If so please add test device with a proper device id.

AdRequest adRequest = new AdRequest();
adRequest.addTestDevice(AdRequest.TEST_EMULATOR);               // Emulator
adRequest.addTestDevice("TEST_DEVICE_ID");                      // Test Android Device

Hope this will help you.


Because the height of the admob banner...

For Android Tablet, the size of the Admob is 90dp for height

On my app, if I change the height of admob, then it's ok on Tablet.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜