I have a problem integrating Admob interstitial ads. My application supports orientation in both portrait and landscape, and so I set the manifest:
android:screenOrientation="fullSensor"
The problem is that the Admob interstitial appears to be locked / locked by the device’s original orientation at startup. For example. if I launch the application in portrait orientation, and then rotate the device in landscape mode and then display an ad, then it appears on the side (in portrait orientation) ...
How can I force the interstitial reset object to a new device orientation?
I load the ad as follows:
interstitialAd = new InterstitialAd(activity); interstitialAd.setAdUnitId(Config.ADMOB_UNIT_ID); AdRequest adRequest = new AdRequest.Builder() .addTestDevice("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") .build(); interstitialAd.loadAd(adRequest);
and then showing it as follows:
interstitialAd.show();
android admob
magritte
source share