Reputation: 176
Im doing an app using cordova, and Im trying to use the splash screen for android, but I don't know how to do it or if I have to install a plug-in, the splash screen for iOS is working fine.
Hoping some one can point me on the right direction on how to apply the splash screen for android
Upvotes: 1
Views: 1363
Reputation: 11597
start splash in MainActivity: super.setIntegerProperty("splashscreen", R.drawable.splash); super.loadUrl("file:///android_asset/www/index.html", splash_time_in_ms);
then stop it somewhere: navigator.splashscreen.hide();
Upvotes: 1
Reputation: 10100
Check this link : Android splashscreen configuration in Cordova
SplashScreen (string, defaults to splash): The name of the file minus its extension in the res/drawable directory. Various assets must share this common name in various subdirectories.
Just add this below line inside config.xml
file :
<preference name="SplashScreen" value="mySplash"/>
Note : mySplash
will be a png file from res/drawable folders.
Upvotes: 2