I have created a Custom Splash In My React Native Application & it works well on All iOS Devices & even works on couple of Android devices.
So the issue coming in Android device is when I launch Application by Clicking on App Icon first it shows the Black screen with the App Icon as a Fake Splash & then it shows the custom Splash which.
So is there reason why it’s coming only on Specific Android device ?
And is there any way we can disable it ?
2
Answers
Finally after doing lots of research I found the root cause of why this additional splash coming only on specific Android devices just before Custom Splash.
So the reason is In Android OS & later OS versions there is an additional Feature presented called "Default Splash", So What it will do is It will take App Icon as a Logo & will load it in centre of the black screen while launching the Application as a Default Splash.
So you won't need to do any extra efforts for adding a Splash Screen it will automatically take it.
Important Note :
As mentioned above it will only work on the Android devices running with OS version 12 or higher. Android OS below 12 devices will work normally without Default Splash screen.
Possible Solutions :
Now the important question is how we can deal with it if we want to show our on custom splash. So for that there are couple of possible solutions which we can try out.
Solution-1 : We can override the Default splash with custom splash, However its not a tried & tested solution but we can definitely try on it
Solution-2 : We can show Custom Splash Just after the Default Splash, This is tried & tested possible scenario & works well on all android devices. Only it will make difference will be like on OS 12+ devices it will show Default as well as Custom Splash & on older devices it will show only Custom Splash
Solution-3 : Last possible solution is We can try to disable the Default Splash, how ever this is not recommended solution
Hope this will help to everyone.
The issue you are experiencing with the "fake" splash screen appearing before the custom splash screen on some Android devices is likely due to the device’s default behavior when launching apps. Some Android devices may display a blank screen with the app icon as a "fake" splash screen while the app is loading, before displaying the custom splash screen that you have created.
To disable the default "fake" splash screen on Android devices, you can try the following steps:
Add the following code to your AndroidManifest.xml file:
Replace @drawable/custom_splash with the resource ID of your custom splash screen. This code tells Android to use your custom splash screen instead of the default "fake" splash screen.
Create a new file named styles.xml in the res/values directory of your Android project, if it doesn’t already exist.
Add the following code to styles.xml:
Replace @drawable/custom_splash with the resource ID of your custom splash screen. This code sets the background of the app’s window to your custom splash screen.
Add the following code to your MainActivity.java file:
This code sets the app’s theme to the AppTheme style defined in styles.xml, which sets the background of the app’s window to your custom splash screen.
After following these steps, the default "fake" splash screen should be replaced with your custom splash screen on Android devices that support this customization. However, it’s important to note that not all Android devices support this customization, and some devices may still display the default "fake" splash screen.