1 Reply Latest reply on Apr 7, 2017 7:00 AM by taywagmbh

    PGB cli-6.5.0: splashscreen not showing in android 5.0

    taywagmbh

      since many days i try to get my custom splashscreens to show in android (tested on a 5.0 device). i'm using the cordova-plugin-splashscreen plugin and i'm building remote via console (phonegap remote build android). the project folder structure is:

      • www
        • js
        • css
        • img
        • res
          • icon
            • [..]
          • screen
            • android
              • drawable-land-hdpi-screen.png

              • drawable-land-mdpi-screen.png

              • drawable-land-xxhdpi-screen.png

              • drawable-port-hdpi-screen.png

              • drawable-port-mdpi-screen.png

              • drawable-port-xxhdpi-screen.png

              • drawable-land-ldpi-screen.png

              • drawable-land-xhdpi-screen.png

              • drawable-land-xxxhdpi-screen.png

              • drawable-port-ldpi-screen.png

              • drawable-port-xhdpi-screen.png

              • drawable-port-xxxhdpi-screen.png

            • ios
              • [...]
          • .pgbomit
        • index.html
      • config.xml
      • icon.png
      • splash.png

       

       

      and my config.xml looks like:

       

      <?xml version='1.0' encoding='utf-8'?>

      <widget id="ch.taywa.test" version="1.0.5" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">

          <name>TEST</name>

          <description>

              Splash Test

          </description>

          <author email="info@taywa.ch" href="http://taywa.ch">

              Taywa.ch

          </author>

          <content src="index.html" />

          <preference name="phonegap-version" value="cli-6.5.0" />

          <preference name="AppendUserAgent" value="pgapp" />

          <preference name="orientation" value="default" />

          <preference name="fullscreen" value="true" />

          [...]

          <preference name="AutoHideSplashScreen" value="true" />

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

          <plugin name="cordova-plugin-statusbar" />

          [...]

          <plugin name="cordova-plugin-splashscreen" />

         

          <splash src="splash.png" />

          <icon src="icon.png" />

          <platform name="android">

              <allow-intent href="market:*" />

              <preference name="android-minSdkVersion" value="16" />

              <preference name="android-installLocation" value="auto" />

              <preference name="SplashMaintainAspectRatio" value="true" />

              <preference name="SplashShowOnlyFirstTime" value="false" />

              <icon qualifier="ldpi" src="www/res/icon/android/drawable-ldpi-icon.png" />

              <icon qualifier="mdpi" src="www/res/icon/android/drawable-mdpi-icon.png" />

              <icon qualifier="hdpi" src="www/res/icon/android/drawable-hdpi-icon.png" />

              <icon qualifier="xhdpi" src="www/res/icon/android/drawable-xhdpi-icon.png" />

              <icon qualifier="xxhdpi" src="www/res/icon/android/drawable-xxhdpi-icon.png" />

              <icon qualifier="xxxhdpi" src="www/res/icon/android/drawable-xxxhdpi-icon.png" />

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

              <splash qualifier="land-mdpi" src="www/res/screen/android/drawable-land-mdpi-screen.png" />

              <splash qualifier="land-hdpi" src="www/res/screen/android/drawable-land-hdpi-screen.png" />

              <splash qualifier="land-xhdpi" src="www/res/screen/android/drawable-land-xhdpi-screen.png" />

              <splash qualifier="land-xxhdpi" src="www/res/screen/android/drawable-land-xxhdpi-screen.png" />

              <splash qualifier="land-xxxhdpi" src="www/res/screen/android/drawable-land-xxxhdpi-screen.png" />

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

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

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

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

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

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

          </platform>

          <platform name="ios">

              [...]

          </platform>

          <access origin="*" subdomains="true" />

          <allow-intent href="http://*/*" />

          <allow-intent href="https://*/*" />

          <allow-intent href="tel:*" />

          <allow-intent href="sms:*" />

          <allow-intent href="mailto:*" />

          <allow-intent href="geo:*" />

          <allow-navigation href="*" />

      </widget>

       

       

      .. the icon is shown but not the splashscreen. looking at the log from build.phonegap.com shows, that it is prosessing the splash screens:

       

      signing: assets/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js

      signing: res/drawable-land-hdpi-v4/splash.png

      signing: res/drawable-land-ldpi-v4/splash.png

      signing: res/drawable-land-mdpi-v4/splash.png

      signing: res/drawable-land-xhdpi-v4/splash.png

      signing: res/drawable-land-xxhdpi-v4/splash.png

      signing: res/drawable-land-xxxhdpi-v4/splash.png

      signing: res/drawable-port-hdpi-v4/splash.png

      signing: res/drawable-port-ldpi-v4/splash.png

      signing: res/drawable-port-mdpi-v4/splash.png

      signing: res/drawable-port-xhdpi-v4/splash.png

      signing: res/drawable-port-xxhdpi-v4/splash.png

      signing: res/drawable-port-xxxhdpi-v4/splash.png

       

      ... and if i download the APK and decompile it with apktool i can also see the files in those folders. but still: launching the application just shows a solid dark gray color.

       

      i already tried to move the res folder outside the www folder and change the src-attribures in the splash and icon nodes of the config.xml - but then not even the icon is included and the default phonegap-bot-cube is shown.

       

      any hints?

        • 1. Re: PGB cli-6.5.0: splashscreen not showing in android 5.0
          taywagmbh Level 1

          me again... it's still not working on android. icons are not a problem and ios is working also (with the old splash-image setup - the new format is not supported PGB but in cordova). back to android: i tested more things:

          • not working on a android 6.0 device either
          • i cloned  GitHub - phonegap/phonegap-app-star-track: The PhoneGap media example app and build it with PGB but no splashscreens either
          • in the config.xml, i removed the preference "SplashShowOnlyFirstTime" to eliminate possible sources of problems
          • and raised minSdkVersion to 19 (to support xxxhdpi qualifier for icons )
          • and removed <splash ... xxxhdpi > nodes because this qualifier is only for icons, not splashscreens

           

          the later two points are according to "Providing Resources | Android Developers ". now the config.xml looks like this:

           

          <platform name="android">

                  <allow-intent href="market:*" />

                  <preference name="android-minSdkVersion" value="19" />

                  <preference name="android-installLocation" value="auto" />

                  <preference name="SplashMaintainAspectRatio" value="true" />

                  <icon qualifier="ldpi" src="www/res/icon/android/drawable-ldpi-icon.png" />

                  <icon qualifier="mdpi" src="www/res/icon/android/drawable-mdpi-icon.png" />

                  <icon qualifier="hdpi" src="www/res/icon/android/drawable-hdpi-icon.png" />

                  <icon qualifier="xhdpi" src="www/res/icon/android/drawable-xhdpi-icon.png" />

                  <icon qualifier="xxhdpi" src="www/res/icon/android/drawable-xxhdpi-icon.png" />

                  <icon qualifier="xxxhdpi" src="www/res/icon/android/drawable-xxxhdpi-icon.png" />

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

                  <splash qualifier="land-mdpi" src="www/res/screen/android/drawable-land-mdpi-screen.png" />

                  <splash qualifier="land-hdpi" src="www/res/screen/android/drawable-land-hdpi-screen.png" />

                  <splash qualifier="land-xhdpi" src="www/res/screen/android/drawable-land-xhdpi-screen.png" />

                  <splash qualifier="land-xxhdpi" src="www/res/screen/android/drawable-land-xxhdpi-screen.png" />

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

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

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

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

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

              </platform>

           

          i'm really at a loss here...

           

          are splashscreens working in Phonegap Build at all or only with local cordova builds? is there a working example of an android app with splashscreens on github or elsewhere?