How do I send an AJAX request on Mobile via Intel XDK

0 favourites
  • 8 posts
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • Um Hello,

    Idk where i should've put this but I'm sending an AJAX request to my website (goapp-wbackend.rhcloud.com), it's running Go 1.6.3 on the Apache Server with "Content-Security-Policy": "default-src https://goapp-wbackend.rhcloud.com", and I'm trying a GET or POST request on the website, now, it works well in localhost mode, but when I export via Cordovia/IntelXDK, and I build or debug, it gives me an AJAX 404. Plain that. You can test the website and I'll send you a HelloWorld! (as I said, it works well in localhost:8080)

    Other Headers: "Access-Control-Allow-Origin":"*"

    My Whitelist on Intel XDK:

    i've been hitting my head on the wall for a while now, maybe Ashley can help,

    although maybe it's because I need to update JQuery.

    EDIT: If anybody got it working, Please post your stuff, I'd greatly appreciate it.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The ajax plugin works fine with Intel XDK. The problem is your local server. You can't use it from another device except your PC...

  • saad Swad, it is not local, it is hosted on Openshift and can be accessed by anybody aroubd the world, you can try it. (I just accessed it from my mobile device' chrome browser without any issues. But in XDK, it just gives me plain 404 not found

    Edit: If you did get it working please send me youur capx, I'd wanna compare mine eith yours

  • "Your built app behavior may differ compared to what is displayed in Intel App Preview.

    Your project includes Cordova plugisn that are not included in App Preview. These plugins are not supported by App Preview:

    cordova-plugin-whitelist"

    There is the problem it seems, I'll try including the allow tags in my index.html file

  • Hi, this zip file contain capx, snapshots and apks : https://www.dropbox.com/s/2h4fo19gp0ghzyj/Ajax.rar?dl=0

  • saad Swad, Oh, I got it working, Thank you!

    Apparently I had to set the permissions for media, otherwise I couldn't use AJAX

  • Hey guys...I'm going through the same problems. How do you solve?

    I'm using AJAX plugin (with GET and POST method request)...on my PC, it works fine, but on my android, it fails.

    My intel xdk is 3522 (with Cordova CLI 6.2.0).

    Please, help me.

  • Hi, marciolevi

    You have to go in the parameters of your app, in the permissions section, check if your phone allow "Media" to your app.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)