- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi If we are using the Android build or the ANdroid crosswalk build the cross domain ajax calls using the jquery are not working , while those calls work if we choose the legacy build. The calls works fine in the app previews , only on the real device it fails. Please let me know if you have any work around or fix for this.
FYI server is sending the data with correct headers and i have enable the access mode to * in the XDK.
Regards
Amar
- Tags:
- HTML5
- Intel® XDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just Now i updated my cordova CLI version to 3.5 and then it works fine for me , So below is the setting for me, which worked fine for the me.
domain list have below values *, http:\\*, https:\\* , my server allowing the cross domain calls by sending the cross domain header.
below is the jquery code
$.ajax({ "method": "POST", "url": MY_SERVER_URL, dataType: 'json', crossDomain: true, error: function (jqXHR, textStatus, errorThrown) { alert('new textStatus=' + textStatus + ' errorThrown=' + errorThrown); }, success: function (response) { } });
Thanks Swati for your kind support and efforts.
Regards
Amar
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Amar,
Please send your .apk and the entire project zip, I'll have a look at it and see what's wrong.
Did you start your project with HTML5+Cordova project type?
Thanks,
Swati
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Swati,
This is also the case for me. I've been trying to compile and build my project yesterday and AJAX calls are not working.
Me and Amar have the same case. I could also send to you my .apk if you want.
Regards,
Nikko
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Amar's app worked on my android 4.4.2 device. I debugged the app, it might be that it's failing on Android 5.0. Are you also using Android 5.0? Also, please try using Cordova CLI 3.5 instead of 4.1.2 and see if that works for you.
Thanks,
Swati
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Swati,
My app still doesn't work on real devices. But it works great on the emulator and debug tab. I am testing on Android 4.1.2 device and 4.4.2 and I'm getting the same results on both devices.
All $.ajax calls return Status of 0.
I also changed CLI version to 3.5 and still the same. Any build I do it doesn't work.
I'm new to IntelXDK, and your help is very much appreciated. I'm already stuck here for 2 days figuring this thing out.
Thank you!
Regards,
Nikko
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Nikko,
Did you put * in the Domain List box under build settings on Projects page?
Please send me your project zip as well.
Swati
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Swati,,
I am tried the app on the Samsung Galaxy S4 android v 4.4.2 , kernel v. 3.4.0-1125940, baseband version I337UCUFNC1, but it still doesn't work , I deleted the project and created a new hybrid project with same source code, but still the call is failing , i have domain as * , http:\\* , https:\\* in my project configuration , but still same issue exists.
Regards
Amar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Swati,
The sample ajax application which you sent , is also having the same problem , in emulator it runs fine , but on real device it failed with same error not found. :)
I tried to build my code with adobe phone gap build service , In that build it works fine on real device , but admob plugin stopped working. i tried to build your ajax project using the legacy build, it works in that build. So it looks like there is some bug in the new build, or we are missing something. Please let us know if you find some solution , I believe you are using the dell venue device for your testing, please try with some other device as well.
Regards
Amar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Swati,
The sample app did not work for me same as Amar.
I'll send you my zip including the .apk of both the sample ajax test and my app.
Thanks,
Nikko
EDIT --
@Swati - I did include my website url in the whitelist and I also tried putting * to allow all website but still it doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just Now i updated my cordova CLI version to 3.5 and then it works fine for me , So below is the setting for me, which worked fine for the me.
domain list have below values *, http:\\*, https:\\* , my server allowing the cross domain calls by sending the cross domain header.
below is the jquery code
$.ajax({ "method": "POST", "url": MY_SERVER_URL, dataType: 'json', crossDomain: true, error: function (jqXHR, textStatus, errorThrown) { alert('new textStatus=' + textStatus + ' errorThrown=' + errorThrown); }, success: function (response) { } });
Thanks Swati for your kind support and efforts.
Regards
Amar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hmmm.. Strange and weird but awesome!
I tried what Amar did and it worked for me.
Thank you also to Swati for the CLI 3.5 tip.
Now it's working. I can now continue in developing this app.
Thank you so much for your support.
Regards,
Nikko
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm glad with Cordova CLI 3.5, ajax calls worked for you. I've reported this issue. Until we have a resolution please continue to use CLI 3.5.
Thanks,
Swati
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Swati,
My app is still not able to consume the web service which is another domain i have made all the changes in my project .Please help me out with it.
thanks
Bhavya Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everybody
I have the same problem, but in this case now phonegap doesn't work with CLI 3.5, I try with the ajax but i dont have response,
Any idea? Can you help me?
Thanks
Xoch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please see this doc page: https://software.intel.com/en-us/xdk/docs/using-cordova-whitelist-rules-with-intel-xdk

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page