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


#10

I’m having the exact same problem too. I thought it may have been because of crosswalk, but I downloaded the basic tabs application, emulated onto an android device, and BOOM, no splashscreen. WHERE HAS IT GONE??? @mhartington WE NEED YOUR HELP :smile:


#11

In your config.xml, you need to add the following preferences:

<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />

Where foo is the name of the splash screen file.
Make sure you’re including the first preference

http://plugins.cordova.io/#/package/org.apache.cordova.splashscreen


#12

@mhartington I already have that in my config.xml file.

...
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="3000"/>
<platform name="android">
  <icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
...


#13

So lets go over what going on

  1. Are you using crosswalk?
  2. Do you have the splash screen plugin install?

If you have crosswalk installed, that is a known bug, which the cordova team needs to fix.


#14
  1. Yes
  2. Yes

So it looks like we need to wait for the cordova team to fix it for my application.

However, I tested with the default tabs application, and the splashscreen doesn’t show either.

$ ionic start myapp tabs
$ ionic plugin add org.apache.cordova.splashscreen
$ ionic platform add android
$ ionic build android
$ ionic run android

No splashscreens. :fearful:

Thanks @mhartington for the help.


#15

Well you missed a step @seanhill

$ ionic start myapp tabs
$ ionic plugin add org.apache.cordova.splashscreen
$ ionic platform add android
$ vi config.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.ionicframework.tmp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  <name>tmp</name>
  <description>
        An Ionic Framework and Cordova project.
    </description>
  <author email="hi@ionicframework" href="http://ionicframework.com/">
      Ionic Framework Team
    </author>
  <content src="index.html"/>
  <access origin="*"/>
  <preference name="webviewbounce" value="false"/>
  <preference name="UIWebViewBounce" value="false"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="BackupWebStorage" value="none"/>

  <!-- You still need to add this to the config.xml -->
  <preference name="SplashScreen" value="screen" />
  <preference name="SplashScreenDelay" value="10000" />
  
  <feature name="StatusBar">
    <param name="ios-package" value="CDVStatusBar" onload="true"/>
  </feature>
</widget>
$ ionic build android
$ ionic run android

This will give you a splash screen on android w/o crosswalk


Navbar linear gradient and button backgrounds
#16

@mhartington you’re right. Once again. Thanks!

In the meantime, I’ll just :`( while cordova updates…


#17

We all will, le sigh


#18

I also had the same issue but checking through commits for the splash screen plugin it looks like they added support for Cordova 4.0 in this commit:

Updating to latest has removed the white screen during launch from within my app.

Now I only have a white screen when animating to the multitasking app list on Lollipop.


[SOLVED] Splash screen not showing, already tried answers on other posts and nothing!
#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.