Closed Datpt2508 closed 2 months ago
Has been reported before #393 and #411. No one has submitted a fix yet...
Why not dig into the Android code and try to find a fix / submit a PR?
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
I have the same issue. @Datpt2508 Have you found the solution ? @dylancom Can you take a look again at this issue, please!
any update ? ..
I did some research and found it is caused by <activity android:launchMode=”singleTask” />
inside '/android/app/src/main/AndroidManifest.xml'. When I removed the line (which is the same as setting it to standard) the modal didn't close anymore.
A user in #411 suggested setting it to <activity android:launchMode=”singleTop” />
.
But I don't know if you can safely remove / change this without other stuff being affected.
Maybe some other Android experts have some more knowledge on this? @DoctorJohn @mikehardy Do we need to advise a different launchMode for using this package?
Edit: It was introduced to React-Native by this commit https://github.com/facebook/react-native/commit/7a42596438018129d52ff04899ab4ddabd27cdcb, to make sure that the application is resumed when pressing the app icon. So it seems not safe to remove / change this line.
Maybe some learnings from other packages can be used? https://github.com/bitpay/bitpay-app/pull/160, https://github.com/auth0/react-native-auth0/pull/350
Here's another useful resource I'm currently reading while looking into this issue:
I checked what the Flutter package is using since technically they have similar requirements to RN. They use singleTop
and it looks like none reported this issue in their repository.
(However, I stumbled across an issue there that suggest that showing interstitials in the background might result in a warning. I assume that means opening them in the background is not allowed, but this might be something to keep in mind.)
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
What happened?
I get the error InterstitialAd closes automatically when I retract the app to the background and reopen it. This does not happen for the Foreground state. Can anyone help me keep InterstitialAd when the app is in the background?.
https://github.com/invertase/react-native-google-mobile-ads/assets/107094515/b8f6b3f9-6767-4520-9069-3f13191709b5
Platforms
Android
React Native Info
Are your using Typescript?
package.json
app.json
ios/Podfile
No response
android/build.gradle
No response
android/app/build.gradle
No response
android/settings.gradle
No response
AndroidManifest.xml
No response