Software Archive
Read-only legacy content
17061 Discussions

Android .APK problem

Charles_Richar_T_
322 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
1 Reply
Reply