javascript - how to open inappbrowser asynchronously in cordova project -


i creating android app in phonegap cordova ,here converting website webview using in appbrowser pluggin.my problem while loding inappbrowser shows white screen in app ,is there way avoid blank screen.i have set flash sreen app,but not efects inappbrowser.

i can solution problem in following 1 of way

1)if there way set flash screen inappbrowser

or

2)if able load inappbrowser asynchronously ,during loading time can show flashscreen of app

or

3)any other sollution?

i have used following javascript code

function ondeviceready() {     var url = 'http://www.mahadevaastro.com/bayarkart/';     var target = '_blank';     var options = "location=no,zoom=no"     var option1 = "zoom=no"     var ref = cordova.inappbrowser.open(url, target, options);    //   var ref = window.open(url, target, options, option1);      ref.addeventlistener('loadstart', loadstartcallback);     ref.addeventlistener('loadstop', loadstopcallback);     ref.addeventlistener('loadloaderror', loaderrorcallback);     ref.addeventlistener('exit', exitcallback);      function loadstartcallback(event) {          showspinner();      }      function loadstopcallback(event) {         hidespinner();     }      function loaderrorcallback(error) {         console.log('loading error: ' + error.message)     }      function exitcallback() {         console.log('browser closed...')     }      function showspinner() {         navigator.notification.activitystart("bayar speed kart", "its loading....");         //  $.mobile.loading("show");     }      function hidespinner() {         navigator.notification.activitystop();         //$.mobile.loading("hide");     }      // handle cordova pause , resume events     document.addeventlistener( 'pause', onpause.bind( ), false );     document.addeventlistener( 'resume', onresume.bind( ), false );      // todo: cordova has been loaded. perform initialization requires cordova here. }; 

once suffered same proble how solve problem loading gif image in loadstart method

        ref.addeventlistener("loadstart", function () {          ref.executescript(            // { code: "document.body.style.backgroundcolor = 'yellow';" },               { code: "document.body.style.background = 'url(loading.png)';" },                 // url("paper.gif");            function (values) {                 //alert(values[0]);             }         );     }); 

Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -