L
L
Leonid2016-09-02 14:57:52
Android
Leonid, 2016-09-02 14:57:52

Can't install splashscreen in Android PhoneGap app - what's wrong?

The config.xml has the following lines:

<platform name="android">
        <splash platform="android" density="land-ldpi" src="res/screen/android/drawable-land-ldpi-screen.png" />
        <splash platform="android" density="land-mdpi" src="res/screen/android/drawable-land-mdpi-screen.png" />
        <splash platform="android" density="land-hdpi" src="res/screen/android/drawable-land-hdpi-screen.png" />
        <splash platform="android" density="land-xhdpi" src="res/screen/android/drawable-land-xhdpi-screen.png" />
        <splash platform="android" density="land-xxhdpi" src="res/screen/android/drawable-land-xxhdpi-screen.png" />
        <splash platform="android" density="land-xxxhdpi" src="res/screen/android/drawable-land-xxxhdpi-screen.png" />
        <splash platform="android" density="port-ldpi" src="res/screen/android/drawable-port-ldpi-screen.png" />
        <splash platform="android" density="port-mdpi" src="res/screen/android/drawable-port-mdpi-screen.png" />
        <splash platform="android" density="port-hdpi" src="res/screen/android/drawable-port-hdpi-screen.png" />
        <splash platform="android" density="port-xhdpi" src="res/screen/android/drawable-port-xhdpi-screen.png" />
        <splash platform="android" density="port-xxhdpi" src="res/screen/android/drawable-port-xxhdpi-screen.png" />
        <splash platform="android" density="port-xxxhdpi" src="res/screen/android/drawable-port-xxxhdpi-screen.png" />
    </platform>
<platform name="ios">
        <splash height="1136" platform="ios" src="res/screen/ios/[email protected]~iphone.png" width="640" />
        <splash height="1334" platform="ios" src="res/screen/ios/Default-667h.png" width="750" />
        <splash height="2208" platform="ios" src="res/screen/ios/Default-736h.png" width="1242" />
        <splash height="1242" platform="ios" src="res/screen/ios/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" platform="ios" src="res/screen/ios/[email protected]~ipad.png" width="2048" />
        <splash height="768" platform="ios" src="res/screen/ios/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" platform="ios" src="res/screen/ios/[email protected]~ipad.png" width="1536" />
        <splash height="1024" platform="ios" src="res/screen/ios/Default-Portrait~ipad.png" width="768" />
        <splash height="960" platform="ios" src="res/screen/ios/[email protected]~iphone.png" width="640" />
        <splash height="480" platform="ios" src="res/screen/ios/Default~iphone.png" width="320" />
    </platform>

For iOS, the splash screen is displayed, for Android it is not.
All image files are in place, all paths are correct, I follow the XML format according to the instructions: docs.phonegap.com/phonegap-build/configuring/icons... and https://cordova.apache.org/docs/ru/latest/ config_r...
But the splash screen is not displayed - I checked it on several devices. What could be wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Leonid, 2016-09-03
@easycode

The problem was that I trusted the HelloWord sample application in the PhoneGap CLI. End up here:
According to the original documentation: docs.phonegap.com/phonegap-build/configuring/icons... , the density attribute is not correct, it should have the name: qualifier
I.e. here is a correct example:

<splash platform="android" qualifier="port-ldpi" src="res/screen/android/drawable-port-ldpi-screen.png" />

S
Sergey Korablev, 2016-09-02
@JresKorablev

Try adding before<platform name="android">
value - time in milliseconds

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question