bug: Capacitor 4 shows an incorrect default splash screen
See original GitHub issueBug Report
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 4.0.1
@capacitor/core: 4.0.1
@capacitor/android: 4.0.1
@capacitor/ios: 4.0.1
Installed Dependencies:
@capacitor/cli: 4.0.1
@capacitor/core: 4.0.1
@capacitor/ios: 4.0.1
@capacitor/android: 4.0.1
[success] iOS looking great! 👌
[success] Android looking great! 👌
Platform(s)
Android
Current Behavior
Please see the top-left corner in the below picture.
Expected Behavior
The splash screen should correctly show similarly the project that creates with Capacitor 3.
Code Reproduction
Here is the repo https://github.com/m3thom/ionic-splash-screen
Other Technical Details
npm --version
output: 8.3.0
node --version
output: v14.17.0
pod --version
output (iOS issues only):
Additional Context
Issue Analytics
- State:
- Created a year ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
My application with ionic/capacitor 4 does not show the splash ...
It only shows a blank screen, it doesn't even show the screen that capacitor shows by default. this is my capacitor.config.ts
Read more >Splash Screen Capacitor Plugin API
The Splash Screen API provides methods for showing or hiding a Splash image. ... By default, the Splash Screen is set to automatically...
Read more >Ionic 6, capacitor 4 android splash screen
Hi, Im using Ionic 6, capacitor 4. Created an empty project, added android platform, open android studio and installed on my device (Android ......
Read more >How to Add Icon and Splash Screen to your Ionic App - Medium
This will create a new blank Ionic/Vue application project inside the folder “myApp”, by enabling capacitor on it. Our APP name will be...
Read more >Splash screens - Android Developers
The default value is 0, where either the icon is displayed on the splash screen (if the launching activity sets the splashScreenStyle to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No, it depends on the device OS, on another Android 12 with Lineage OS it sort of works (shows the app icon as a splash screen instead of the splash.png) so we’ll live with that for the time being.
I can’t reproduce on my Android 12 device (pixel 6), in Android 12 should show the app round icon, not the splash image that it used to show in Capacitor, that’s the new Android 12 Splash Screen OS behaviour.
I’ve tested in several models with Android 12 and in Pixel models is works as expected, but on Samsung it’s not working as expected (the behaviour is still different than yours, but not what is expected). I understand that as a bug on the devices, not in Capacitor, phone vendors installing Android 12 on their devices should be respecting the new Android 12 Splash Screen API instead of doing their custom things and looks like that’s what One Plus is also doing.
You can try changing
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
back to<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
, but I doubt it will change anything.You can also try removing
<item name="android:background">@drawable/splash</item>
and playing with other values like the explained on the Android 12 Splash Screen API page and see if One Plus respect those. But sadly there is nothing we can do about it if vendors don’t respect the OS or don’t implement its features correctly.