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 :
now when build of app using xdk cloud, .apk file.
on uploading file genymotion emulator, screen below :
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
did cordova hybrid app build , caused problem.
when did legacy android build, problem solved.
so need work cordova build ?
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
Post a Comment