Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
17060 Discussions

Android .APK problem

Charles_Richar_T_
1,052 Views

In the emulator the web service works. When build and install .apk does not work.

En el emulador el servicio web funciona. Cuando compila y se instala el .apk no funciona.

URL web Service:  http://solucionesapps.co/intelxdk/webServiceSlim/books/

code app.js

function myEventHandler() {
    "use strict" ;

    var ua = navigator.userAgent ;
    var str ;

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

    console.log(str) ;
    
    var completeUrl = 'http://solucionesapps.co/intelxdk/webServiceSlim/books/';
        //$("#resutlado").html(completeUrl);
        $.ajax({
            url: completeUrl,
            type: 'GET',
            dataType: 'json'})
        .then(function(response){
            console.log(response);
            var items = [];
              $.each( response[14], function( key, val ) {
                  if(!/^([0-9])*$/.test(key)){
                    items.push( "<li>" + key + "= " + val + "</li>" );
                  }
              });
            $("#resutlado").html('.then <br>' + items );
        })
        .fail(function(err){    
            $("#resutlado").html('.fail+ ' + err.responseText);
        });
}

 

0 Kudos
1 Solution
3 Replies
Charles_Richar_T_
1,052 Views

If you don't see the images, please visit this blog. Thanks.

http://rc-code.blogspot.com/2015/03/intel-xdk-android-apk-problem-in.html

0 Kudos
Rakshith_K_Intel
Employee
1,052 Views

Can you add " * " as domain list in project settings and try, this worked for me when I built .apk

0 Kudos
Reply