react-native-admob / admob

Admob for React Native with powerful hooks and components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AppOpenAd displayed above the interstialAd which is violation

zoobibackups opened this issue · comments

I want showOnAppForeground to true which is working fine, BUT when we resume the app on interstialAd then appOpenAd is shown above the InterstitialAd, which is violation.

import { AppOpenAdProvider, TestIds } from '@react-native-admob/admob';

    <AppOpenAdProvider
      unitId={TestIds.APP_OPEN}
      options={{ showOnColdStart: true, showOnAppForeground : true }}
    >
      {...........................................}
    </AppOpenAdProvider>

So how can we handle this using this library or avoid violation ??????

Use state to keep track if InterstialAd is opened?

Use state to keep track if InterstialAd is opened?

Yes I am tracking interstialAd but unable to track appOpenAd.
There is no show method of appOpenAd.

How I manage the state of appOpenAd????? like show appOpenAdd when interstitial is not open.

Use state to keep track if InterstialAd is opened?

Yes I am tracking interstialAd but unable to track appOpenAd. There is no show method of appOpenAd.

How I manage the state of appOpenAd????? like show appOpenAdd when interstitial is not open.

@wjaykim any thoughts on this??

I think you should use global state to track if interstitial ad is opened and if then disable the app open ad until the ad is dismissed.

AppOpenAd will never be shown or disabled while interstitial is showing. @wjaykim Will this functionality be added to this library in future updates???

What does this mean?

App open will never be shown or disabled while interstitial is shown

Add global state value whether another ad is showing and set showOnForeground option to !adShowing using the global state.

Currently I think adding the logic is too much for this library and it is app developer's part to manage the violation as adding the logic may restrict customization in some cases.

Ok never mind, i will handle this using global state.
Thanks alot!