Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / SendHTTPRequest not working when debugging / broadcasting

Author
Message
JohnStabler
AGK Bronze Backer
11
Years of Service
User Offline
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 18th Feb 2016 22:13
For some reason when I debug or broadcast to my android phone the SendHTTPRequest() function always returns and empty string. It works as expected if I run it normally. Can anyone else confirm this behaviour?
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 19th Feb 2016 15:00
It's always best if you provide code that demonstrates your problem.
JohnStabler
AGK Bronze Backer
11
Years of Service
User Offline
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 19th Feb 2016 17:43
pinete
13
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 21st Feb 2016 19:38
I'm going to try it in a couple of days from now due to my project needs so I'll let you know, for sure!
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 22nd Feb 2016 15:08
That code isn't functional, as the program will end before getting a connection.

Perhaps by posting some actual runnable code, someone may provide assistance?
JohnStabler
AGK Bronze Backer
11
Years of Service
User Offline
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 23rd Feb 2016 10:56
Set breakpoint at Print statement and then check value of result$:

Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 23rd Feb 2016 17:08 Edited at: 23rd Feb 2016 17:08
When you say run it normally, do you mean from your machine by pressing f5, or as an APK installed on your android device, as when you broadcast to an android phone, you're asking the android device to connect to localhost (which doesn't exist on a phone) and access a web page (that doesn't exist on your phone) via a web server (that doesn't exist on that phone.)

If you want to use your phone to connect to Service.aspx on your desktop machine which is actually hosting the web page, change Localhost to the machines IP address.
JohnStabler
AGK Bronze Backer
11
Years of Service
User Offline
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 23rd Feb 2016 20:30
When I say run normally, I mean running it (F5) rather than debug.

As I said in my first post, it doesn't work in debug or when broadcast to Android. When on Android I use an Internet web domain.

I was hoping someone could test the function in debug mode and confirm the behaviour.
JohnStabler
AGK Bronze Backer
11
Years of Service
User Offline
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 24th Feb 2016 18:56 Edited at: 25th Feb 2016 09:28
BUMP: BTW, this is still happening for me after updating to v2.17.
Hi. I am a real person (not a bot). I appreciate all replies.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 25th Feb 2016 16:58
Tested on a Nexus 7 with the following code and it worked in both broadcast and debug mode
JohnStabler
AGK Bronze Backer
11
Years of Service
User Offline
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 25th Feb 2016 20:07
Thanks Paul.

I suspect there may be some strangeness going on with my firewall.
Hi. I am a real person (not a bot). I appreciate all replies and advice.
pinete
13
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 28th Feb 2016 18:06 Edited at: 28th Feb 2016 18:07
Hi,
tested httprequest in both Samsung Galaxy 4 and iPhone 6 broadcasted and don't work. I'll test the Paul's code and let you know. :o)
Best!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 28th Feb 2016 20:56
i have a samsung galaxy tab pro and it works fine for me in broadcast mode (paul's code)

Sign up for NaGaCreMo!

Login to post a reply

Server time is: 2024-11-25 09:55:17
Your offset time is: 2024-11-25 09:55:17