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 / HTTP commands in AGK player for Android - NOT working ?

Author
Message
xprezz
12
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 21st Jul 2012 11:58
HTTP commands in AppGameKit player for Android - NOT working ?
Anyone seen if the AppGameKit Player for Android is to be updated ? As the HTTP commands work fine on the PC but causes the AppGameKit Player to return Error.

Grr...trying to use OpenBrowser()........AGK Player gives Unknown Instruction 981 on my HTC....works fine on the PC.

Anyone have an idea why ?

Swedish guy returning to coding after loooong break, still finds it exhilarating. great tool this DBpro!
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 21st Jul 2012 13:47
Did you compile the latest player, or use an old one from the android store?

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
xprezz
12
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 21st Jul 2012 15:14
I used the "old one from Google Play".
There is a new player to be compiled , please forgive my ignorance, what is the deal ?

Swedish guy returning to coding after loooong break, still finds it exhilarating. great tool this DBpro!
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 22nd Jul 2012 04:22
Yes, you compile it as a part of setting up the android environment. I have the Android Player 1076 version attached here. Just uninstall the android player, and install this one. Make sure you have set the phone to accept program installs from "other sources".

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.

Attachments

Login to view attachments
xprezz
12
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 23rd Jul 2012 00:58
Hmmm... Thank you. I think.

Now the sequence which runs then OpenBrowser() command is triggered without an error (I included a sound to be played whin it does) - but it does not produce any result. No webpage is loaded. Not on the system browser. Not in a window. Yes I have Sync():ed.

My next try...

I then tried to use the following code :
id = CreateHTTPConnection()
result = setHTTPHost(id,"www.digital-skills.co.uk",0)
r$ = SendHTTPRequest (id,"index.html")
Print(r$)
CloseHTTPConnection(id)

The regular outcome is the print out of a HTML source of a webpage, it too works fine on the PC but on the HTC Desire HD it produces no result. Nothing.

Grah!!

All I want to do is to display a webpage, when the user hits a sprite on the screen. And I can't get the webpage to load from the phone. The options are very limited indeed.

Is the solution to make a "proper compiled apk" ? I have not got acquainted with the process of compiling an android app yet.

PleasePleaseHelp!

Swedish guy returning to coding after loooong break, still finds it exhilarating. great tool this DBpro!
xprezz
12
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 24th Jul 2012 09:18
Help!

Swedish guy returning to coding after loooong break, still finds it exhilarating. Great tools these AppGameKit and DBpro!
xprezz
12
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 29th Jul 2012 22:35
Eh....please. Help.

Swedish guy returning to coding after loooong break, still finds it exhilarating. Great tools these AppGameKit and DBpro!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 30th Jul 2012 16:41
Can you put "http://www.digital-skills.co.uk/index.html" in a browser on your Android device and have it see the page?

Cheers,
Ancient Lady
AGK Community Tester
xprezz
12
Years of Service
User Offline
Joined: 13th Jun 2011
Location:
Posted: 1st Aug 2012 17:07
@ Ancient Lady. Absolutely the HTC is a standard Desire HD w/ no tweaks, And using the browser it surfs just as it should.

Swedish guy returning to coding after loooong break, still finds it exhilarating. Great tools these AppGameKit and DBpro!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 1st Aug 2012 19:31
I just did a very fast test and was able to show the output.

The sample you displayed has a couple of problems.

Either you are doing all of it within the main do loop, with the sync command, which would be overloading things just a bit and not the most efficient.

Or you are not using the print statement within the main do loop and the display disappears the by the second sync() cycle.

Can you show more of the code so that we can see if there is an issue somewhere else that is causing the problem?

I have no difficulty using the HTTP commands on an android device. But I am not using the Player, I am running the apps directly on my device.

Cheers,
Ancient Lady
AGK Community Tester
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Aug 2012 21:46
Okay I just ran the following on three different Android devices, using broadcast and directly on the devices (a 4.1 and two 3.2, different manufacturers):


It worked just fine on all devices and all run modes.

So, I would have to say that you are probably not doing exactly what you think you are. If you want to share more code, then maybe we can figure out what is and isn't working.

Cheers,
Ancient Lady
AGK Community Tester

Login to post a reply

Server time is: 2024-04-28 12:16:40
Your offset time is: 2024-04-28 12:16:40