react-native-google-mobile-ads icon indicating copy to clipboard operation
react-native-google-mobile-ads copied to clipboard

[📚] Hide ads in Google play or firebase tests

Open raajnadar opened this issue 1 year ago • 3 comments

Documentation Feedback

I didn't find any example or function to hide the ads on google play or firebase tests, The bot clicks on the ads and reports 2-3 crashes every time. Is there any way to hide them in the test mode?

This seems like a solution for native apps

https://stackoverflow.com/a/70415575/5519872

Official docs - https://firebase.google.com/docs/test-lab/android/android-studio#java

I am using the packing in Expo SDK 46

raajnadar avatar Aug 04 '22 21:08 raajnadar

One could probably use the isRunningInTestLab util from the react-native-firebase package (at least for firebase tests).

DoctorJohn avatar Aug 05 '22 09:08 DoctorJohn

Can this function be added to this package?

raajnadar avatar Aug 19 '22 19:08 raajnadar

A PR to add this as a utility function would be fine by me, I'd merge it if it seemed like it was in a sensible location.

mikehardy avatar Aug 24 '22 00:08 mikehardy

This still needs an interested party to add it, if desired. I use firebase personally so have no interest in duplicating the code here but I will merge a PR if it shows up. Until then, you might like https://github.com/ratson/react-native-firebase-test-lab/blob/master/android/src/main/java/name/ratson/RNFirebaseTestLabModule.java

I'm going to close this as stale though for lack of action

mikehardy avatar Oct 12 '22 13:10 mikehardy