Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Splash Screen from Ionic Browser

I am having the following splash screen when starting my app:

enter image description here

I've only run

ionic cordova platform add browser

ionic cordova build browser

my config.xml

<preference name="ScrollEnabled" value="false" />
<preference name="android-minSdkVersion" value="19" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="StatusBarBackgroundColor" value="#000000" />

Appreciate the help!

like image 861
spaceman Avatar asked Jul 31 '18 05:07

spaceman


2 Answers

You have to change

value='screen'

with your own image (like assets/logo.png) in the config.xml file.

You can also change defaults sizes :

<preference name="SplashScreenWidth" value="300" /> <!-- defaults to "170" --> 
<preference name="SplashScreenHeight" value="300" /> <!-- defaults to "200" -->

The documentation of the splashscreen plugin : https://github.com/apache/cordova-plugin-splashscreen

like image 184
Sébastien B Avatar answered Sep 30 '22 17:09

Sébastien B


Yes, change

value='screen'

to

value='/assets/imgs/logo.png'.

If you want to edit splash picture, go to

plugins/cordova-plugin-splashscreen/src/browser/SpalshScreenProxy.js. 

There is a default route for splashscreen pic /img/logo.png, it's not functional.

like image 25
Ray Trus Avatar answered Sep 30 '22 17:09

Ray Trus