1
votes

I am just implementing admob on my one android application.I am requesting to admob for show interstitial ads on app menu screen .But on that time if i exit from the application & admob request is not received yet due to slow internet connection.So admob are showing interstitial after some time on my phone screen. Is this google ad policy violation ?? .Because admob not give any method for stop interstitial ads (Google Product) if it is not received yet.

2
You should call the interstitial isReady() method before show()Rabi
It's a shame that google haven't provided a onPause and onResume for Interstitial that can automatically detect and not show ad when app goes to background.Muhammad Babar

2 Answers

1
votes

You can call finish on the activity, if possible.

If not, why not set a flag using onPause or onStop events, check this flag before calling show () on the interstitial.

-1
votes
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:noHistory="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|
uiMode|screenSize|smallestScreenSize" />

Just add android:noHistory="true" in the manifest file it should work.