Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-8345

Splash screen does not display on Android.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      OS: Ubuntu 14.04 LTS/x64
      Node.js: 0.10.35
      Cordova: 4.2.0

      Description

      Splash screen does not display on Android. On iOS it is displayed.

      $ cordova --version
      4.2.0
      $ cordova create project1
      $ cd project1
      $ cordova platform add android ios
      $ cordova emulate

      The iOS simulator splash screen is displayed. However, the Android Emulator it is not displayed.

      It seems to be resolved by adding the following sentence to the config.xml, but wanting to be displayed in the default state.

      <preference name="SplashScreen" value="screen" />

      It seems to be solved by modifying the CordovaActivity.java.

      $ diff -Nur CordovaActivity.java.orig CordovaActivity.java
      — CordovaActivity.java.orig 2015-01-22 16:39:42.000000000 +0900
      +++ CordovaActivity.java 2015-01-22 16:39:56.000000000 +0900
      @@ -359,7 +359,7 @@
      init();
      }
      this.splashscreenTime = preferences.getInteger("SplashScreenDelay", this.splashscreenTime);

      • String splash = preferences.getString("SplashScreen", null);
        + String splash = preferences.getString("SplashScreen", "screen");
        if(this.splashscreenTime > 0 && splash != null)
        {
        this.splashscreen = getResources().getIdentifier(splash, "drawable", getClass().getPackage().getName());;

        Attachments

          Activity

            People

            • Assignee:
              agrieve Andrew Grieve
              Reporter:
              tomo_masakura Tomo Masakura
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: