iOS PhoneGap / Cordova – Splash screen control

In Cordova from 1.6 version exist “AutoHideSplashScreen” attribute. If you need show splash screen until you get onDeviceReady event - change value to NO.

function onBodyLoad()
{  
 document.addEventListener("deviceready", onDeviceReady, false);
}
function onDeviceReady()
{
 navigator.splashscreen.hide();
}

But if you have Cordova version until 1.8 it doesn't work. Use instead navigator object:

 cordova.exec(null, null, "SplashScreen", "hide", []);
 cordova.exec(null, null, "SplashScreen", "show", []);

But for iPad you need add to project two new images:

 Default-Portrait.png
 Default-Landscape.png

6 comments:

  1. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.

    rpa Training in tambaram

    blueprism Training in tambaram

    automation anywhere training in tambaram

    iot Training in tambaram

    rpa training in sholinganallur

    blue prism training in sholinganallur

    automation anywhere training in sholinganallur

    iot training in sholinganallur

    ReplyDelete
  2. This blog is the general information for the feature. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.
    java training in chennai | java training in bangalore

    java online training | java training in pune

    ReplyDelete