cordova - ajax call fails only on Android 4.1 + Phonegap -
i developping app phonegap build (phonegap 3.3). doing ajax phone call (jsonp) retrieve file , works, except on android 4.1. seeing there new thing on android 4 : getallowuniversalaccessfromfileurls...is problem ? phonegap bug ?
thanks
js:
homecoming $.ajax({ url: url, jsonpcallback: "callback", datatype: 'jsonp', timeout: 15000, success: function() { console.log("getjsonpfile ajax successful"); }, error: function(xoptions, textstatus) { console.log("problem ajax jsonp request in getjsonpfile"); console.log("xoptions :"); console.log(xoptions); console.log("textstatus :"+textstatus); } });
there seem issue phonegap , android 4.1 see here.
the solution utilize basic xmlhttprequest shown here.
it worked in case.
android cordova
No comments:
Post a Comment