Software Archive
Read-only legacy content
17061 Discussions

deviceready has not fired after 5 seconds.

Matt_B_
Beginner
886 Views

Seems to be a new issue since upgrading to 1878.

I have this code.

    var str ;
    
    
   if( window.Cordova)
   {
       console.log('yes cordova');
       console.log(dev.isDeviceReady);
   }

    if( window.Cordova && dev.isDeviceReady.c_cordova_ready__ ) {
        
            str = "Cordova device ready detected at " + dev.isDeviceReady.c_cordova_ready__ + " milliseconds!" ;
        go(str);
    }
    else if( window.intel && intel.xdk && dev.isDeviceReady.d_xdk_ready______ ) {
            str = "Intel XDK device ready detected at " + dev.isDeviceReady.d_xdk_ready______ + " milliseconds!" ;
        go(str);
    }
    else {
        str = "Bad device ready, or none available because we're running in a browser." ;
        //go();
    }

 

Cordova is recognised but when I print dev.isDeviceReady to console I get c_cordova_ready__ and d_xdk_ready______ are false.

I also get deviceready has not fired after 5 seconds.  and Bad device ready, or none available because we're running in a browser.

0 Kudos
3 Replies
Swati_S_Intel1
Employee
886 Views

Hello Matt,

Which device are you trying this on? Are you using App Preview or Built app? Did you start your project using template? If so which template?

Thanks,

Swati

0 Kudos
Matt_B_
Beginner
886 Views

Hi Im debugging on the device (using a built version of android - not legacy, not crosswalk). Im not really using a template but I did borrow some code basically I use some of the init-app.js code. I have also included these scripts at the bottom of my index.html page.

<script src="cordova.js" id="xdkJScordova_"></script>

<script src="js/init-app.js"></script>     
<script src="xdk/init-dev.js"></script> 
<script src="http://debug-software.intel.com/target/target-script-min.js#somestuffhere"></script>

0 Kudos
Matt_B_
Beginner
886 Views

Just to add to this - when I debug using App Preview - all the device ready xdk.ready events fire like normal. Unfortunately facebook and other third party plugins are not supported so I can't go far down this route. Back on device as built apps and they fail.

0 Kudos
Reply