Splashscreen on Android doesn't work (only showing white screen for 2 seconds)


#19

@dkeane it looks like the code on the github repo for Splashscreen.java is different then when I install it via the command line. Is their code out of date with the cordova registry?


#20

@dkeane can you explain the process you used to display a splashscreen? Thanks a lot


#21

Yes it looks like the plugin registry is pointing to their latest release: 0.3.5 from December. I added the plugin by using the github url which pulled in latest from master:

cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git

To setup the splash screen I followed the steps listed above as everything seems to work like normal.


Crosswalk Integration Beta in Ionic CLI (v1.3.2)
#22

you mean with crosswalk ?


#23

installing splashscreen plugin from github does the job for me. I am using crosswalk


#24

unfortunately for me ;(


Ionic and Crosswalk: Splash Screen error
#25

For me it worked i.e. after removing it
(cordova plugin rm org.apache.cordova.splashscreen)
and adding it again directly from the git repo
(cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git)
the splash screen is back.
Many thanks to @dkeane for the hint :smile:

Now the only problem is that after the splash screen there is a black screen for 2 seconds.

Any ideas how to get rid of it?

I’m using crosswalk.


Ionic and Crosswalk: Splash Screen error
#26

You may want to increase the time that the splash screen will appear:

Default is 3 seconds, it may be worth making it longer and then hiding it when ionic is ready:

$ionicPlatform.ready(function() {  
	if(navigator.splashscreen) {
		navigator.splashscreen.hide();
	}
}

#27

Thank you very much, it works!


#28

@dkeane many thanks again! Now it works like a charm :smile:


#29

I have the same white screen problem, I installed the crosswalk by CLI, which came out in the last update, installed pluginsplash screen and I generated the icons and splash through the CLI as well.
The icons works but no splash.


#30

Hey @rodrigo_drds, make sure you install the plugin straight from the github url, as mentioned above. I’ve also noticed you need to remove the platform and add it again sometimes for the plugins to work properly.


#31

My configs:
Your system information:

OS: Windows 7 SP1
Node Version: v0.10.35
Cordova CLI: 4.2.0
Ionic Version: 1.0.0-beta.14
Ionic CLI Version: 1.3.3

and plugins
com.ionic.keyboard 1.0.3 "Keyboard"
org.apache.cordova.console 0.2.12 "Console"
org.apache.cordova.device 0.2.13 "Device"
org.apache.cordova.engine.crosswalk 0.0.1-dev "Crosswalk Engine"
org.apache.cordova.splashscreen 0.3.5 “Splashscreen”

preferences in project:

icon e splash in project:

<platform name="android">
<icon src="resources\android\icon\drawable-ldpi-icon.png" density="ldpi"/>
...
<icon src="resources\android\icon\drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
<splash src="resources\android\splash\drawable-land-ldpi-screen.png" density="land-ldpi"/>
...
<splash src="resources\android\splash\drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>

the three points are all variations of icons and splash generated;
and I’m not using the policy still $ cordovaSplashscreen.

I am really stuck with this issue :’( rs


#32

@rodrigo_drds you need to install the Splashscreen from github not from cordova registry, and this will install the version 0.3.6-dev which work like a charm

Version 0.3.5 from Splashscreen does not work with Crosswalk, the dev version works.


#33

It worked perfectly with the git link, thank you


#34

All right great, so the splash screen now shows on Android with Crosswalk. Now however comes another problem :slight_smile:

$ionicPlatform.ready(function(){
	$timeout(function(){
		$cordovaSplashscreen.hide();
	}, 10000);
});

10 seconds just for an extreme example. What happens here is that the app launches, showing my splashscreen imge, then the splash screen image disappears and shows a white screen for ~9 seconds, and then it shows my app. So it is “hiding” the splashscreen at the appropriate time, but before then it’s hiding the actual splashscreen image. Anyone else run into this?


#35

I guess the white screen is related to the way Chrome work, but am not sure .

for me I have solved this issue by increasing the time via config.xml like this:

<preference name="SplashScreenDelay" value="15000"/>

#36

Hum could this help: https://github.com/driftyco/ionic-cli/issues/1608


#37

this working for me. http://www.codingandclimbing.co.uk/blog/ionic-2-fix-splash-screen-white-screen-issue-14


#38

I found the solution for your White SplashScreen problem. With the last version of Ionic, you need to verify a line in your config.xml file :

Make sure you have the line :
<preference name="SplashScreen" value="screen"/>

Instead of :
<preference name="SplashScreen" value="splash"/>

You need to have the value “screen” here and not the old version which is “splash” !!!

Now my SplashScreen is not white anymore and it takes my resources files generated from PSD file.

And here is my Ionic Info prompt :

Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: 1.9.1
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v6.9.5
Xcode version: Xcode 8.2.1 Build version 8C1002