How to stop AppOpenAd showing multiple times? (Unity)

Viewed 27

I have implemented AppOpenAds from Admob, they work as intended...To a point.

Unfortunately, when the viewer is watching a 'rewarded' video (ie to get coins in-game) after it finishes, it then shows an AppOpenAd, as it obviously thinks the user has left the app (when they have just watched a video instead). So they are getting a double-whammy ad!

Is there any way I can stop this?

It's using this;

private void OnAppStateChanged(AppState state)
{
// Display the app open ad when the app is foregrounded.
UnityEngine.Debug.Log("App State is " + state);
if (state == AppState.Foreground)
{
AppOpenAdManager.Instance.ShowAdIfAvailable();
}
}

Edit - just to clarify - Rewarded ads work, they just then show an AppOpenAd when the rewarded ad finishes due to it thinking I was outside of the app.

0 Answers
Related