react-native-inappbrowser
react-native-inappbrowser copied to clipboard
forceCloseOnRedirection don't work as expected
I had mystery problem than Custom Tabs closing automatically if I go to other app. Notice that I had forceCloseOnRedirection value set to true. Actually there is two issues:
- I found explanations about this setting in https://github.com/droibit/react-native-custom-tabs:
forceCloseOnRedirection boolean undefined Workaround that Custom Tabs doesn't close on redirecting back to app scheme.
That said, force close should happen only if coming back to app from for example oauth registeration flow, not all the time if you go somewhere else from active browser window. Also if you have open link and open active app listing, it shows that inAppBrowser as weird new screen (Honor 9, Android 8) which you can't choose because it disappears. So setting is currently useless (didn't test yet what happens after some redirection if this is set to false, could be that there is no need for keep that at all?).
- There is no explanations about settings in this repo README, so had to guess, find from code or try to find comparison setting in libraries mentioned in credits what things should do. This is not nice.
EDIT: Tested one flow with redirection back to app, and for me application opened (and custom tabs closed) succesfully also with forceCloseOnRedirection false, maybe that's unrelevant and confusing setting?
@maestor check this discussion ant let me know https://github.com/droibit/react-native-custom-tabs/pull/11
any pull request to improve the README is always welcome my friend! 👍
@maestor check this discussion ant let me know droibit/react-native-custom-tabs#11
yeah I have read this, but that doesn't explain why this library's custom tabs will close automatically when app go to background and forceCloseOnRedirection have set to true. that's not redirect use case. I'm not expert about implementation and my Java knowlegde is close to zero so I don't know why this behaviour happening and that's why open new issue 😄
about README and settings part, I can try improving some day, but first have to find some time for researching what all those settings exactly do.
The README was updated :)
Hi, Any update on this issue. Happening on 3.51 too. When app come to foreground the browser is automatically. I have a 2 Factor Authentication so have to put app in background to approve 2FA request.
Are you reopening the app by pressing app icon?