cordova-plugin-inappbrowser
cordova-plugin-inappbrowser copied to clipboard
Splash screen with android inappbrowser bug
The plugin as it sits handles IOS and Android differently in regards to how it handles the splash screen.
Use case: I am launching the inappbrowser on opening of the app, i would like the in app browser to behave like it does on ios ( not close the splash screen on launch of the inappbrowser ). On android it closes the splash screen on opening of the inappbrowser vs when i want it to close (when the inappbrowser page load completes), which causes a white screen until the inappbrowser loads.
Any tips, ideas, or plugin fixes that could make the android component act like it does on IOS and not interfere with the splash screen?
If you are using _blank
target, you can use hidden=yes
option when opening InAppBrowser and the loadstop
event to call show
.
But anyway, I don't think it's a good user experience to launch the InAppBrowser
as soon as your app loads.
@jcesarmobile Yes i can have it in hidden=yes mode however when the web-view is hidden performance drops dramatically slowing down page loading causing in this case a long splash screen load time. It would be nice if it behaved the same way it does on IOS, meaning leaving the view open without it closing the splash screen. I am using the inappbrowser in a very specific way so its not a user experience issue...
@keenan35i Did you solve this problem?
I'm assuming you're already have the auto hide flag off so that you control when to hide the splashscreen via the .hide()
call, however I want to note that doing this isn't recommended to be used as a loading screen.
Your splashscreen should not be your loading screen. Android counts the time it takes for your app to dismiss the splashscreen and if it takes too long` then it will consider the app an ANR ("Android Not Responsive"). The user may or may not receive a prompt to kill the app, but you will get a +1 on an ANR count which will hurt your Google Play listing as Google will consider your app unstable.
Instead the splashscreen should dismiss fairly quickly, and if applicable, transition to an app loading screen with some kind of progress indicator.
If you follow this advice..., then you may end up finding a workaround to your root issue.
Reference links:
- https://github.com/apache/cordova-android/issues/1510
- https://issuetracker.google.com/issues/230236390