Note that there are some explanatory texts on larger screens.

plurals
  1. POAdMob AdView only appearing in landscape orientation
    primarykey
    data
    text
    <p>Ok, I'm officially at my wit's end here. Working on an Android app that uses AdMob. Everything is set up to the letter following <a href="http://www.admob.com/docs/AdMob_Android_SDK_Instructions.pdf" rel="nofollow">their instructions</a>, no errors, etc.</p> <p>Problem is: I only see ads when the phone is in landscape orientation.</p> <p>I've searched online and done every last thing I can think of to test this: </p> <ul> <li>Tried it in test mode and normal mode</li> <li>Removed the orientation configChanges from my main activity's manifest and their handlers in the code, in case they were causing it</li> <li>Removed all functionality of the app so that onCreate looked like the one in the instructions above</li> <li>Tried every possible change of main layout - placing it in different locations, removing other widgets, different layouts, etc</li> </ul> <p>These are just a summary of a few hours of testing, every time the result is the same. Portrait shows no ad, landscape shows the ad (as/where expected - not stretched, but the max width issue is well known and not a problem).</p> <p>Logcat shows everything to be working properly in both orientations: Requests are made, ads are returned. I can click on the ads that appear in landscape, but tapping the area they're meant to be in portrait does nothing.</p> <p>It's driving me mental! Any ideas?</p> <p><strong>Edit: Okay, the problem is gone but I'm afraid I can't really call it a "fix".</strong> I remembered ads working fine in a previous but similar app. It was using a different version of the AdMob SDK - I don't know any details, but admob-sdk-android.jar is 77kb rather than 136kb.</p> <p>I copied the 77kb one from the old app into the new app, along with the attrs.xml file, which necessitated changing the primaryTextColor attribute in the AdView to textColor, and that's it. Works perfectly now - and as a bonus, the ads stretch horizontally across the whole screen in landscape view as well!</p> <p>I'm posting this as an edit rather than an answer since it seems more appropriate and I'd still love to know if anyone can shed some light on the issue. Was it an AdMob SDK issue?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload