Ajax somehow not working on mobile

Get help using Construct 2

Post » Fri Sep 23, 2016 8:42 am

Okay, so I'm making a game for my client, simple stuffs but they want to have a highscore function. They've managed the server side so I just need to shoot them with some data with AJAX. It's done and working fine, when I tested on desktop it works perfectly, the problem comes when I tested it on mobile.

It doesn't work, the On complete trigger didn't fire. I thought something is weird so I prepared an On error trigger, but it didn't fire as well. I tried to watch the progress from On progress trigger but still I got nothing :(. I didn't use intel xdk or anything, I exported the game with HTML5 export.

And then I tried adding a file to my project and then call that text file from ajax to see if ajax works on mobile or not. With this test, it works. I can receive the data inside the text. So, I'm thinking that it's not the ajax's fault, but maybe it's something from the server. I asked my client but he said he doesn't have any security thing set up (yet).

So... anybody knows why I can request a project file from Ajax but can't request from a site only from mobile? Any help is appreciated.

The event sheet can be seen here: https://www.dropbox.com/s/vgqzrxmuojo6i ... 1.png?dl=0
and the game URL and the game ID combined make this link, you guys can open it to see it's a highscore data: http://gnapigame-143414.appspot.com/_ap ... 1675244544
B
45
S
13
G
2
Posts: 173
Reputation: 5,331

Post » Fri Sep 23, 2016 3:03 pm

See if these helps:
http://stackoverflow.com/questions/1937 ... ot-working
http://stackoverflow.com/questions/1994 ... le-browser
https://www.google.com/search?q=ajax+re ... 8&oe=utf-8

I get this data:
Code: Select all
[{"username": "Yadhiek Subagio", "score": 3598, "id": 5715999101812736, "time": "23-09-2016 17:06"}, {"username": "Yadhiek Subagio", "score": 830, "id": 5664248772427776, "time": "23-09-2016 17:35"}, {"username": "Yadhiek Subagio", "score": 700, "id": 5644406560391168, "time": "22-09-2016 15:58"}, {"username": "Yadhiek Subagio", "score": 700, "id": 5654313976201216, "time": "22-09-2016 15:58"}, {"username": "Yadhiek Subagio", "score": 700, "id": 5741031244955648, "time": "22-09-2016 15:58"}, {"username": "Yadhiek Subagio", "score": 400, "id": 5668600916475904, "time": "16-09-2016 22:33"}, {"username": "Yadhiek Subagio", "score": 250, "id": 5707702298738688, "time": "16-09-2016 21:31"}, {"username": "Yadhiek Subagio", "score": 150, "id": 5639445604728832, "time": "16-09-2016 20:24"}, {"username": "Yadhiek Subagio", "score": 100, "id": 5659313586569216, "time": "16-09-2016 21:52"}, {"username": "Yadhiek Subagio", "score": 50, "id": 5732568548769792, "time": "23-09-2016 16:37"}]
from your API call. (I am on a Win7 PC though)
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Mon Sep 26, 2016 5:26 am

Thanks, I'll check those sites and let my client know what's wrong. Maybe he can fix it if it's a server issue, because I thought this problem is construct 2's Fault.
B
45
S
13
G
2
Posts: 173
Reputation: 5,331


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests