cordova - How can I delay splash screen hide on using PhoneGap? -
i have phonegap app targeting ipad. works on ios 7. updated ipad mini ios 8 , splash screen hides 1-2 seconds of white screen before page loads. i'm guessing there many resources getting loaded before screen render. there way make splash screen visible longer? looked possible in older versions of phonegap i'm not finding recent versions
tried in index.html did not create visible difference
<script type="text/javascript" charset="utf-8" src="cordova.js"></script> <script type="text/javascript" charset="utf-8"> // wait device api libraries load // function onload() { document.addeventlistener("deviceready", ondeviceready, false); } // device apis available // function ondeviceready() { // safe use device apis settimeout(function() { navigator.splashscreen.hide(); }, 2000); } </script>
so opened safari web inspector, , looked @ javascript console. checked see if access splash navigator object , not seem available.
put after deviceready, seems duration has been deprecated 3.1 version:
settimeout(function() { navigator.splashscreen.hide(); }, 2000);
Comments
Post a Comment