Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

AppOpenAd displayed above the interstialAd which is violation #86

Closed
zoobibackups opened this issue Dec 31, 2021 · 7 comments
Closed

AppOpenAd displayed above the interstialAd which is violation #86

zoobibackups opened this issue Dec 31, 2021 · 7 comments

Comments

@zoobibackups
Copy link

zoobibackups commented Dec 31, 2021

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 ??????

@tarouboy
Copy link

Use state to keep track if InterstialAd is opened?

@zoobibackups
Copy link
Author

zoobibackups commented Dec 31, 2021

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.

@zoobibackups
Copy link
Author

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??

@wjaykim
Copy link
Collaborator

wjaykim commented Jan 6, 2022

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.

@zoobibackups
Copy link
Author

zoobibackups commented Jan 6, 2022

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

@wjaykim
Copy link
Collaborator

wjaykim commented Jan 6, 2022

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.

@zoobibackups
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants