goffioul opened a new issue, #1468:
URL: https://github.com/apache/cordova-android/issues/1468

   # Bug Report
   
   ## Problem
   
   Upgrading to cordova-android@11 and the new splashscreen system comes with 2 
regressions in my app:
   1. Android does not seem to use the splashscreen API for home/launcher app 
(tested in `system-images;android-31;default;x86_64`), which result in 
splashscreen completely missing in my app; there is no redraw on screen until 
my app closes the splashscreen
   2. there is no no way to reshow the splashscreen; this is a bummer as the 
previous splashscreen system was a very convenient interstitial screen to use 
while the app was reloading
   
   To reproduce:
   1. create a new app
   2. add cordova-android@11 platform
   3. use preferences:
   ```
   <preference name="AutoHideSplashScreen" value="false" />
   <preference name="FadeSplashScreen" value="false" />
   <preference name="ShowSplashScreenSpinner" value="false" />
   <preference name="RemoveSplashScreenOnPause" value="false" />
   ```
   4. add utility button in `www/index.html`:
   ```
   <button id="splashscreen-button">Show splashscreen</button>
   ```
   5. edit `www/js/index.js`:
   ```
   function showTemporarySplashscreen() {
       navigator.splashscreen.show();
       setTimeout(() => navigator.splashscreen.hide(), 3000);
   }
   
   function onDeviceReady() {
       ...
       setTimeout(() => navigator.splashscreen.hide(), 3000);
       document.getElementById('splashscreen-button').addEventListener('click', 
showTemporarySplashscreen, false);
   }
   ```
   6. edit activity in `platforms/android/app/src/main/AndroidManifest.xml`:
   ```
   <category android:name="android.intent.category.HOME" />
   <category android:name="android.intent.category.DEFAULT" />
   ```
   
   
   ### What is expected to happen?
   1. splashscreen is always displayed at startup
   2. it is possible to reshow the splashscreen at runtime
   
   
   ### What does actually happen?
   When starting the app from the app drawer, the splashscreen is displayed. 
But when installing the app as the default launcher, killing the app, and 
restarting, one can see no splashscreen is displayed by Android.
   
   Also the inability to reshow the splashscreen is a real regression IMO. I 
understand the limitation of the new SplashScreen API, but maybe it would have 
been better to design the new cordova splaschreen system as a complement to the 
legacy system, with opt-in capability for the legacy system, instead of fully 
replacing the legacy system with loss of functionality.
   
   
   ### Version information
   - cordova-android@11
   - Android 12 (emulator: `system-images;android-31;default;x86_64`)
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to