Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid InterstitialAd always not showing properly
    primarykey
    data
    text
    <p>I am implementing InterstitialAd in my app, and follows the Google code example to implement the ad. </p> <h2>Question:</h2> <p>The Ad most of the time cannot be shown properly. I have already set all the activities and also the AdActivity in the Manifest forcing them to be orientation being protrait. Yet it still fails. Are there anyone that know what is the problem? Million thanks!</p> <p>PS: I am not promoting any ad here..just to have a screencapture here for the problem I met</p> <h2>Ad when it is ok:</h2> <p><img src="https://i.stack.imgur.com/X4nCH.png" alt="enter image description here"></p> <h2>But most of the time it is out of screen: it becomes horizontal and have white blank screen at the bottom</h2> <p><img src="https://i.stack.imgur.com/n2VVH.png" alt="enter image description here"></p> <h2>Code:</h2> <pre><code> interstitialAd = new InterstitialAd(this, MY_PUBLISHER_ID); interstitialAd.setAdListener(this); // Set the AdListener. AdRequest adRequest = new AdRequest(); adRequest.addTestDevice(AdRequest.TEST_EMULATOR); interstitialAd.loadAd(adRequest); </code></pre> <h2>Manifest:</h2> <pre><code>&lt;application android:icon="@drawable/logo" android:label="@string/app_name" android:theme="@style/AppTheme" &gt; &lt;activity android:name=".Abc" android:screenOrientation="portrait" android:label="@string/title_activity_startup" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;activity android:name="com.google.ads.AdActivity" android:screenOrientation="portrait" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/&gt; </code></pre>
    singulars
    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