-
-
Notifications
You must be signed in to change notification settings - Fork 234
Browser closing when app sent to background - Android #213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Any pull request is welcome mate! 🙂 |
@JustinJoyce88 would you mind specifying if you have some other configurations to make it work on the older version? I have 3.3.4 with |
It seems that ChromeTabsManagerActivity.java |
any luck on this issue? Getting on Android 9. |
In your android-specific options for InAppBrowser.open add
|
It looks similar to #153. Maybe #153 (comment) helps? |
That do work in some way but it only works when I re-open the app from the android appswitcher. If I open it through the app icon it closes the browser. |
@Auticcat Was you able to resolve the case where browser is closed on android when app is launched from android app launcher icon? |
Nope, just had to deal with it. If anyone is using this package and has an otp step during authentication, you'll probably have cases where this happens. |
It looks like a normal behavior with Android, the Activities are destroyed when the launch icon is pressed again. Let me know if you find any option to change that default native behavior 👍 |
I have the same issue here using the latest lib version. 😞 Tried setting the below params as suggested in #153 and they don't help. 😿
|
Any solution on above. when the app icon is clicked the browser window gets closed |
This works for me! Thanks! |
If your launch activity has launchMode as singleTask it's because of it. I'm not expert in Android but after some searching in google I make up with follow solution (I hope it will help you).
in AndroidManifest.xml move android.intent.action.MAIN to LaunchActivity
|
Hi @Augustach I'm trying to implement your solution but I have trouble understanding how BaseApplication and MainApplication work together. I have this error after my app immediately crashed :
My androidManifest.xml is like this :
Thanks for your help ! |
Okay I found the solution to my problem. I was creating a new
to it ! |
@GautierT can you share your code? I got same issue with you |
Tried @Augustach's workaround in React native 0.68.2
can't cast |
anyone with full working example please? |
following this link helped me now its works just fine |
Thanks - showInRecents solved my issue |
Referenced from docs: https://docs.nativescript.org/guide/extending-classes-and-implementing-interfaces-android#custom-android-application-and-activity and from explanation when using singleTask mode: proyecto26/react-native-inappbrowser#213 (comment)
Please how to do this with a react native kotlin project? |
Looks enough to add
And use it
|
Tried the above but the app gets stuck at bootsplash when returning back to the app |
This comment resolved the same issue for me! Many thanks! |
As far as I can see, this is not intended. We have an app that opens up a form within the webview that requires the user to select a file or an image from the device. When selecting a file, the app gets sent to the background and when sent to the background, the browser closes. This is in the latest version, but if you downgrade to 3.3.4 and make sure that forceCloseOnRedirection is false, the webview should stay open. Please fix in the future.
The text was updated successfully, but these errors were encountered: