cordova-plugin-splashscreen icon indicating copy to clipboard operation
cordova-plugin-splashscreen copied to clipboard

Android: minimizing app while splashscreen is showing hides the splashscreen

Open drewrygh opened this issue 5 years ago • 2 comments

Bug Report

Minimizing and resuming an application hides the splashscreen on Android. This is an issue because apps may have autohide set to false, and may need to wait to hide the splashscreen until data comes back from a server, from a storage plugin, etc. With autohide set to false, I'd expect that the only way to close the splashscreen is from a call to navigator.splashscreen.hide().

Problem

1.) On Android, set <preference name="AutoHideSplashScreen" value="false" />. 2.) Do not call navigator.splashscreen.hide() anywhere in the app, or call it after a long timeout. 3.) When the splashscreen shows, minimize and resume the app.

What is expected to happen?

Splashscreen should continue to show.

What does actually happen?

Splashscreen is hidden.

Environment, Platform, Device

Android Ionic app.

Confirmed an issue on

  • Android, Moto G5+ (Android 8.1)
  • Honor 7X (Android 8.0)

Version information

   Ionic Framework   : ionic1 1.3.4
   @ionic/v1-toolkit : 1.0.22

Cordova:

   cordova (Cordova CLI) : 8.1.2 ([email protected])
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 4 other plugins)

System:

   Android SDK Tools : 26.1.1
   ios-deploy        : 1.9.4
   ios-sim           : 6.1.2
   NodeJS            : v11.0.0
   npm               : 6.4.1
   OS                : macOS
   Xcode             : Xcode 10.2.1 Build version 10E1001

Checklist

  • [x] I searched for existing GitHub issues
  • [ ] I updated all Cordova tooling to most recent version
  • [x] I included all the necessary information above

drewrygh avatar Jun 28 '19 23:06 drewrygh

I put together minimal app that I'm able to reproduce this issue with: https://github.com/drewrygh/splashScreenApp

drewrygh avatar Jun 28 '19 23:06 drewrygh

I'm having a similar issue. If I have... function onPause() { navigator.splashscreen.show();

the same thing happens the splashscreen flashes up for a second and is then hidden. so when tabbing between apps, the page with content is shown not the splashscreen.

wallstudios avatar Jul 03 '19 06:07 wallstudios