When I first launched my app, built using build.phonegap.com and then distributed to my Nexus 7 (running Jelly Bean 4.3), I see a black screen with a gray title bar at the top. Is this normal, or is there a setting I need to enable/disable? I can say that this build was a debug build (I don't know why, but when I checked again the setting was checked).
I'll be glad to provide any insights needed to help, thanks! I can also link the github repo that houses my code if that is helpful.
There's an image:
EDIT2: This also happens after clearing the app from the apps running the in background.
A splash screen, also known as a launch screen, is the first screen that a user sees when opening your app, and it stays visible while the app is loading. You can control when the splash screen disappears by using the native SplashScreen API.
Android Splash Screen is the first screen visible to the user when the application's launched. Splash screen is one of the most vital screens in the application since it's the user's first experience with the application.
Besides that, Android apps don't launch very fast, especially for the first time. There is a delay where splash screen can really help you catch the attention of the user. And this is the right case where Google recommends to use a splash screen. The user will be satisfied for sure.
By adding a platform, Ionic will install Cordova splash screen plugin for that platform so we do not need to install anything afterwards. All we need to do is to find two images. The images should be png, psd or ai files. The minimum dimension should be 192x192 for icon image and 2208×2208 for the splash screen image.
Does your app eventually show or does it just stay blank? Cant really tell what is going on but a quick something came to mind. Are you using a splash screen? Take a look at the config.xml docs at the section about splash screen duration (Android only). The docs can be found here.
Splash Screen Duration
<preference name="splash-screen-duration" value="10000" />
Try setting the duration to 0 (<preference name="splash-screen-duration" value="0" />
) and see what happens.
*On second thought, it probably isn't a splash screen issue but worth a shot. Post some code of what your app is doing (or share github as suggested) and I will see what I can do.
This is an intermediate screen that Android shows while your process is being forked. The black screen is just your window background as defined by your theme. There is a great article here by Cyril Mottier, an Android Developer Expert, on this topic. You can customise this to look a little nicer as explained in the article (basically just change your window background, but be wary of overdraw)
In 2017, the answer to this problem is a lot simpler:
In config.xml
add this line to your widget
declaration (just below the bit that readsxmlns:gap="http://phonegap.com/ns/1.0"
). This tells PhoneGap you want to add some stuff to the Android Manifest:
xmlns:android = "http://schemas.android.com/apk/res/android"
Then add the snippet below somewhere in the same file. Everything between the config tags will be appended to the Android manifest by PhoneGap when the APK is being generated. This little line will simply make your app background transparent so that the black loading screen is never seen.
<config-file platform="android" parent="/manifest" mode="merge">
<application android:theme="@android:style/Theme.Translucent.NoTitleBar"></application>
</config-file>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With