You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Ismael Olusola Jimoh (JIRA)" <ji...@apache.org> on 2013/01/03 11:22:12 UTC

[jira] [Created] (CB-2154) navigator.splashscreen.show() broken in Phonegap 2.2 and 2.3.0rc2

Ismael Olusola Jimoh created CB-2154:
----------------------------------------

             Summary: navigator.splashscreen.show() broken in Phonegap 2.2 and 2.3.0rc2
                 Key: CB-2154
                 URL: https://issues.apache.org/jira/browse/CB-2154
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 2.2.0, 2.3.0
         Environment: Android, Phonegap 2.2 and 2.3rc2
            Reporter: Ismael Olusola Jimoh
            Assignee: Joe Bowser


I tested the navigator.splashscreen.show() function as documented and realised that it is broken.

The Splash-screen works as expected when app launched but a button call to show splashscreen doesn't work.

I had tested this same thing on Phonegap 2.1 and it worked alright so was surprised it didn't work on 2.2. I then tested on Phonegap 2.3 and realised it was also broken.

Below is the code I used:

<!DOCTYPE html>
<html>
  <head>
    <title>Splashscreen Example</title>

    <script type="text/javascript" charset="utf-8" src="cordova-2.3.0rc2.js"></script>
    <script type="text/javascript" charset="utf-8">

    // Wait for Cordova to load
    //
    document.addEventListener("deviceready", onDeviceReady, false);

    // Cordova is ready
    //
    function onDeviceReady() {
        //navigator.splashscreen.show();
    }
    function showSplash() {
        setTimeout(function() {
        	navigator.splashscreen.show();
        }, 2000);
    }
    function hideSplash() {
        setTimeout(function() {
		    navigator.splashscreen.hide();
		}, 2000);
    }

    </script>
  </head>
  <body>
    <h1>Example</h1>
    <button onclick="showSplash()">Show</button>
    <button onclick="hideSplash()">Hide</button>
  </body>
</html>

It doesn't work as mentioned on neither 2.2 nor 2.3.

Thanks.

Ismael



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira