Answer the question
In order to leave comments, you need to log in
How to make the AdMob interstitial ad show only the first time an Activity is shown?
How to display AdMob interstitial ads only when first opening an Activity.
So that after the banner is closed, it is no longer displayed in this Activity. (until the next launch of the application)
Thank you very much in advance!
Answer the question
In order to leave comments, you need to log in
in onStart you open the declaration and switch the variable to true , and in onStop or onDestroy you change the value back to false
. Better yet, store the value in sharedPreferences as I described above, but instead of the sharedPreferences variable.
There is plenty of information on how to use both.
ps If I were you, I would not show an ad on the first launch, because Personally, I would remove such an application myself. Need to find a more competent way to show that was unobtrusive
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question