ios - Cordova Hybrid App fails, Legacy Android Build Works -


i've written small application test working of cordova app on xdk. source code same this question

however, attaching code here :

(function() {  "use strict";  /*    hook event handlers   */  function register_event_handlers()  {        /* button  login */     $(document).on("click", ".uib_w_9", function(evt)     {         //intel.xdk.notification.showbusyindicator();         /*$.post("http://url/test.php", {test:'1'},              function(res){                 alert(res);             }        );*/         $.ajax({           beforesend: function(){             intel.xdk.notification.showbusyindicator();           },           type: "get",           url: 'http://url/test.php',           data:{test:'1'},           success: function(res){               alert(res);               intel.xdk.notification.hidebusyindicator();            },           error:function(res){               alert(res);               intel.xdk.notification.hidebusyindicator();            },           datatype: 'text'         });      });      }  document.addeventlistener("app.ready", register_event_handlers, false); })(); 

this js file of application.

the screenshot of app in xdk emulator :

the app screen

the working screen

now when build of app using xdk cloud, .apk file.

on uploading file genymotion emulator, screen below :

app running in genymotion emulator

the click doesn't anything, nor showbusyindicator() show, nor alert appear.

what missing , going wrong ? i've plans use ide proper project , hence testing, appreciated.

update

the xdk build page did cordova hybrid app build , caused problem.

when did legacy android build, problem solved.

so need work cordova build ?

build page :

build page

there known issue ajax when intel xdk builds apk cordova cli version 4.1.2. on android version > 4.4

there workaround, go project settings -> build settings -> android, change cordova cli version 4.1.2 3.5 , ajax should work.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -