Closed tabowillow closed 1 year ago
Rewarded / Interstitial ads are implemented to start an activity on top of the current activity in Android to show full-screen ads. You can verify that with the Layout Inspector in Android Studio. When that happens, the current activity is paused and stopped. That is why your networking is stopped and resumed when the ad is closed. This is standard Android behavior in React Native.
In order to avoid the situation, I guess that you can use Headless JS or 3rd party libraries that allow running things in the background.
Will close as 'not a bug'. Feel free to reopen if this needs to be addressed further.
MAX Module Version
4.0.0
React Native Version
0.70.1
Device/Platform Info
The problem appears on all physical devices and emulators
Current Behavior
While the ad is showing, it is planned to poll the server (processing user input). But polling stops when ad is shown. This happens exactly at the moment the ad is shown, and not when the
showRewardedAd()
is called, because one request has time to pass. An attempt to wrap ashowRewardedAd()
call in a promise doesn't work.Expected Behavior
While the ad is showing, the rest of the app doesn't stop.
How to Reproduce
I have a function that starts the polling process and shows the ad right after it:
I also tried wrapping the
showRewardedAd()
call in a Promise, that doesn't work either:Additional Info
No response