Search code examples
androidcordovaphonegap-buildsplash-screen

PhoneGap Splash Screen Not Showing


For the last 24 hours I've been trying to get the splash screen to work for my app. I've tried following the documentations but I just don't know what I'm doing wrong or missing. Here's the link to my files I'm using to build: https://mega.nz/#!ZpRQCazY!XThPmX11okVWK4yXL_kSWZY3fHrbVrmzWFIrqQ-OUVw

From what I have gathered, what I have in the config.xml should be correct but when I upload it to https://build.phonegap.com to build, it just won't build with the splash. (The icon somehow works fine.)

The website in there is just a placeholder (you can ignore that). I haven't included the actual files for the splash screen plugin in the file, but the website seems to build the same thing with or without the plugin files included. Please check the config.xml and the images/paths. I'm not sure what is causing this issue.

EDIT: Here's the quick overview of the config xml:

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.splashing.splash" version="1.0.0" 
xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
    <name>Splash</name>
    <description>
        Splash Screen Not Working
    </description>
    <author email="[email protected]" href="http://tempest.com">
        tempest
    </author>
    <content src="index.html" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="14" />
    <preference name='phonegap-version' value='cli-6.5.0' />
    <preference name="Fullscreen" value="true" /> 
    <plugin name="cordova-plugin-splashscreen" source="npm" spec="~5.0.2" />
    <platform name="android">
        <preference name="SplashShowOnlyFirstTime" value="true"/>
        <preference name="SplashScreenDelay" value="3000" />
        <preference name="ShowSplashScreenSpinner" value="false"/>
        <preference name="splashscreen" value="splash" />
        <splash src="splash.png"/>
        <icon src="icon.png"/>
    </platform>
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
</widget>

Solution

  • Try to configure your config like i did. This works just fine for me

    <platform name="android">
        <allow-intent href="market:*" />
        <preference name="SplashScreenDelay" value="3000" />
        <preference name="ShowSplashScreenSpinner" value="false" />
        <preference name="FadeSplashScreen" value="false" />
        <preference name="SplashMaintainAspectRatio" value="true" />
        <preference name="SplashShowOnlyFirstTime" value="false" />
        <icon density="ldpi" src="res/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="res/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="res/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="res/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="res/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="res/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="hdpi" src="res/drawable-land-hdpi/splash.png" />
        <splash density="ldpi" src="res/drawable-land-ldpi/splash.png" />
        <splash density="mdpi" src="res/drawable-land-mdpi/splash.png" />
        <splash density="xhdpi" src="res/drawable-land-xhdpi/splash.png" />
        <splash density="xxhdpi" src="res/drawable-land-xxhdpi/splash.png" />
        <splash density="xxxhdpi" src="res/drawable-land-xxxhdpi/splash.png" />
        <splash density="hdpi" src="res/drawable-port-hdpi/splash.png" />
        <splash density="ldpi" src="res/drawable-port-ldpi/splash.png" />
        <splash density="mdpi" src="res/drawable-port-mdpi/splash.png" />
        <splash density="xhdpi" src="res/drawable-port-xhdpi/splash.png" />
        <splash density="xxhdpi" src="res/drawable-port-xxhdpi/splash.png" />
        <splash density="xxxhdpi" src="res/drawable-port-xxxhdpi/splash.png" />
    </platform>.