[
https://issues.apache.org/jira/browse/CB-8904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14632843#comment-14632843
]
Matthias Eichel commented on CB-8904:
-
Hello,
I think the change to comment out
firstShow=true;
in the onDestroy method leads to an undesireble behaviour: Now, when an app is
"shutdown" for instance via
navigator.app.exitApp();
the splash screen won't show up when restarting the app by clicking on the app
icon. As far as I researched this, it is caused by the fact that exitApp() does
not shut down the app totally. Only the activity is shut down, so firstShow
will never be reset to true without totally shutting down the app. You can
achieve this and make the splash screen reappear at start (for the next time)
when you force stop the app via the settings app on your smartphone/tablet.
I think shutting down the app via exitApp() in combination with listening on
the back button click of the smartphone/tablet is not an unusal use case with
Android, so in my opinion firstShow should again be set to true in the
onDestroy method as it was in the past and as it is up to now in
SplashScreenInternal in the cordova 3.7.2 branch.
To see the behaviour I tried to describe, you can assemble and run a small test
program:
cordova create test example.com Test
cd test
cordova platform add android@4.0.2
cordova plugin add cordova-plugin-splashscreen@2.1.0
then add to config.xml
We will reuse the icon.png as a splash screen, just to show the behaviour
then add to config.js the following line
setTimeout(function(){ navigator.app.exitApp(); }, 7000);
in receivedEvent just after the line
console.log('Received Event: ' + id);
to "shutdown" the app automatically after 7 seconds.
then
cordova build android
cordova run --device
to run on your smartphone/tablet and see what I mean.
> Splashscreen show when open url in _self with inappbrowser on android
> -
>
> Key: CB-8904
> URL: https://issues.apache.org/jira/browse/CB-8904
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, Plugin InAppBrowser, Plugin SplashScreen
>Affects Versions: Master
>Reporter: Mickael Magniez
>Assignee: Joe Bowser
>
> Hi,
> On android, when opening external url in InAppBrowser, using _self,
> splashscreen is showing.
> This is annoying because we have flieckering
> - application
> - splashscreen
> - application again for few millisecond
> - webpage in inappbrowser
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org