Replies: 1 comment 2 replies
-
The white screen is a known issue of the Android 12 Splash Screen API when the app is launched from Android Studio, it affects Android 31+ devices.
You don't have to do anything to use the Splash Screen API, other than having @capacitor/splash-screen plugin installed and having the parent of The Android 12 Splash Screen API is also used in earlier versions because of the |
Beta Was this translation helpful? Give feedback.
-
I am just migrating to capacitor 4 and followed the migration guide to use the new Splash Screen API. I would be happy to see any more detailed documentation, how to use Android splash screens with Capacitor in the future, because I just get a white screen after the migration, before the app content shows up.
When I have a look to the capacitors splash screen plugin, the methods are marked with "Doesn't work on launch when using the Android 12 API". So am I right, that switching to the Splash Screen API, deactivates the plugin functionality and just uses the native splash screen, before the app content shows up? If yes, how can I decide when to hide the splash or shouldnt this used in the future (i.e. fastest way to display the app content and show custom loaders or something like that)? Does this mean, that the splash screen plugin is deprecated for Android 31+?
I just did some steps to migrate, like:
build.gradle:
variables.gradle:
v31\styles.xml
(I downloaded the example starter kit and saved the animated example xml as 'my_splash.xml' to the res/drawable folder.)
AndroidManifest:
MainActivity.java:
But I just get a white screen (@color/launchBackground) before the app content shows up. Maybe someone can assist me what I am doing/understanding wrong here :/
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions