I have implemented AdMob interstitial in my app the method works like this:
- I construct ads object in my activity. (Ads object has reference to the activity)
- In my ads object I check if interstitial was shown in last three minutes with timer, and if it hasn't been shown I show it through handler to that activity.
- If activity is stoped or destroyed I also stop my ads timer
Most of the time this scenario works correctly. But sometimes the ads show up one time even if the app is already exited.
Is there a way to check from my ads object if the activity is really running and it is the current activity running on the screen ?