Open harishchopra86 opened 3 years ago
Please check this comment: https://github.com/proyecto26/react-native-inappbrowser/issues/153#issuecomment-727833604 Let me know
@jdnichollsc Thanks for prompt response.
However it is still the same when application is launched from phone menu launcher icon and I get this error on console when application is launched from launcher icon:
JS: Unhandled Promise rejection: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources$Theme android.content.Context.getTheme()' on a null object reference ; Zone: <root> ; Task: null ; Value: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources$Theme android.content.Context.getTheme()' on a null object reference createAlertDialog(file: node_modules/@nativescript/core/ui/dialogs/index.android.js:8:0)
JS: at (file: node_modules/@nativescript/core/ui/dialogs/index.android.js:95:0)
JS: at ZoneAwarePromise(file: node_modules/@nativescript/zone-js/zone-nativescript.js:902:0)
JS: at alert(file: node_modules/@nativescript/core/ui/dialogs/index.android.js:92:0)
JS: at openBrowser(file: src/app/item/item-detail.component.ts:63:24)
Any advise on its fix would be highly appreciated.
Here is my use case:
That Unhandled Promise rejection
is not related to this library
@jdnichollsc Thanks for checking, is there a way to prevent browser closing when application is launched from background by pressing app launcher icon? Please advise. Thanks.
Sorry, honestly I have no idea, but any pull request is welcome! 👍
I had given it a try already but not able to solve myself so looking for community's help. Struggling with it from last two weeks but can't get any idea to resolve this.
Adding to above, I looked at ChromeTabsManagerActivity callbacks and found that it's onDestroy
callback is called when we open the backgrounded application again by pressing launcher icon and when we open application from recently opened apps nothing is called.
Good catch, it looks like a normal behavior with Android, the Activities are destroyed when the launch icon is pressed again
Try this approach and let me know 👍 https://github.com/proyecto26/react-native-inappbrowser/issues/213#issuecomment-878915862
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
I am using the plugin for opening a login url inside the application where user have to enter his credentials. During that process if user closes the application by pressing home button on android phone, and opens the app again by pressing app icon from phone menu, webview screen is automatically closed. I wanted to know if is there a way to keep the webview login screen open when user opens the app by pressing app icon from phone menu. I am using:
android:launchMode="singleTask"
in AndroidManifest.xmlIs there any code involved?
It can be reproduced in sample application