- There is an issue with the open app ads. when ever there is permission dialogue likelocation, contact for storage dialogueopen by operating system or even an alert like
Alert.alert()
the app open ads appear. this is not the appropriate behaviour for google ads policy. - Similarly there is another issue with ad open ads it appear with transparent background. with which native, banner or app contact is visible behind the open app ads.
- Another issue is that if the interstitial ads appear or inters tail video or rewarded ads the also open app ad appear.
- similar on share dialogue open and after closing that open app ad appear.
I have done various thing to overcome these issue. some of theme resolve temporary but that is not a good solution.
is there an event with which we can check if the a system dialogue is open or some thing other.
useEffect(() => {
const subscription = AppState.addEventListener('change', nextAppState => {
if (
appState.current.match(/inactive|background/) &&
nextAppState === 'active'
) {
setTimeout(() => {
if (AdState.canShowAppOpenAd && my_Screen != 'Places') {
appOpenAd.loaded ? appOpenAd.show() : appOpenAd.load();
} else {
if (navigationScreen == 'Places') {
AdState.canShowAppOpenAd = false;
} else {
AdState.canShowAppOpenAd = true;
}
}
}, 1000);
} else {
appOpenAd.load();
}
appState.current = nextAppState;
setAppStateVisible(appState.current);
});
return () => {
subscription.remove();
};
}, []);
Platforms
Android and iOS
React Native Info
System:
OS: macOS 13.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 7.21 GB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm
Watchman: 2022.12.05.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/apple/.rvm/gems/ruby-2.7.5/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.16 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.6 => 0.70.6
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Package.json
{
"name": "NumberLocator",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint .",
"postinstall": "patch-package"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.17.11",
"@react-native-community/art": "^1.2.0",
"@react-native-community/clipboard": "^1.5.1",
"@react-native-community/masked-view": "^0.1.11",
"@react-native-community/netinfo": "^9.3.7",
"@react-native-community/slider": "^4.4.0",
"@react-navigation/drawer": "^6.5.6",
"@react-navigation/native": "^6.1.1",
"@react-navigation/native-stack": "^6.9.7",
"@react-navigation/stack": "^6.3.10",
"deprecated-react-native-prop-types": "^4.0.0",
"geolib": "^3.3.3",
"google-libphonenumber": "^3.2.31",
"libphonenumber-js": "^1.10.15",
"lottie-react-native": "^5.1.4",
"patch-package": "^6.5.0",
"postinstall-postinstall": "^2.1.0",
"react": "18.1.0",
"react-native": "0.70.6",
"react-native-admob-native-ads": "^0.6.0",
"react-native-android-location-enabler": "^1.2.2",
"react-native-android-open-settings": "^1.3.0",
"react-native-animatable": "^1.3.3",
"react-native-app-intro-slider": "^4.0.4",
"react-native-applovin-max": "^4.1.4",
"react-native-battery": "^0.1.18",
"react-native-compass-heading": "^1.4.2",
"react-native-contacts": "^7.0.5",
"react-native-cool-speedometer": "1.1.0",
"react-native-device-info": "^10.3.0",
"react-native-device-specs": "^0.0.7",
"react-native-full-battery-status": "^0.1.10",
"react-native-geolocation-service": "^5.3.1",
"react-native-gesture-handler": "^2.8.0",
"react-native-google-mobile-ads": "^8.2.2",
"react-native-largelist-v3": "^3.1.0-rc.1",
"react-native-linear-gradient": "^2.6.2",
"react-native-maps": "^1.3.2",
"react-native-maps-directions": "^1.9.0",
"react-native-modal": "^13.0.1",
"react-native-navigation-bar-color": "^2.0.2",
"react-native-neomorph-shadows": "^1.1.2",
"react-native-pager-view": "^6.1.2",
"react-native-paper": "^5.1.2",
"react-native-permissions": "^3.6.1",
"react-native-reanimated": "^2.13.0",
"react-native-responsive-fontsize": "^0.5.1",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.18.2",
"react-native-send-intent": "^1.3.0",
"react-native-splash-screen": "^3.3.0",
"react-native-spring-scrollview": "3.0.2",
"react-native-svg": "12.5.0",
"react-native-svg-transformer": "^1.0.0",
"react-native-system-setting": "^1.7.6",
"react-native-torch": "^1.2.0",
"react-native-vector-icons": "^9.2.0",
"react-native-vitals": "^2.0.1"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "0.72.3",
"react-test-renderer": "18.1.0"
},
"jest": {
"preset": "react-native"
}
}