question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Capacitor 4 shows an incorrect default splash screen

See original GitHub issue

Bug 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. Screenshot_2022-08-01-17-58-55-15_8e8dd22025896c1d7c28dde44f899fc8

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:closed
  • Created a year ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
mirko77commented, Aug 22, 2022

On a Samsung A33, Android 12, the splash screen does not show at all with Capacitor 4, but no problems with Capacitor 3. However, I do notice the same with other apps (Amazon, Outlook, Waze, even the Google ones…)

Did you find a config or a programmatical solution to this problem with capacitor 4?

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.

2reactions
jcesarmobilecommented, Aug 2, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found