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 / OpenBrowser woes.

Author
Message
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 23rd Jul 2013 13:30
I'm using 108Beta15 with the latest Android player available on Google Play (screen says 10000008 build Jul 4 2013 - downloaded just ten minutes ago).

When I try to open a default browser with a URL on Android (using OpenBrowser("www.google.co.uk") for example) the app crashes with message: "Unfortunately, AppGameKit Player has stopped".

I have tried compiling this with the OneClick Deploy method and get the same result (except it says app xxxx has stopped instead of AppGameKit Player of course).

Can anyone get the example openbrowser program to work on Android with the latest build?

Thank you!

Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 23rd Jul 2013 15:51
A common problem, is that the command is run over several loops, and therefore tries to open hundreds of windows.

Make sure you only call the command once, by checking for a flag, and then set that flag, when you open the web page.

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 23rd Jul 2013 16:23
I'm only trying to get the example code to run at the moment. Definitely only attempting to open one window. here is the code:



Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Jul 2013 17:38
Well, you are exiting the loop and then the function and ending the app immediately after you call OpenBrowser.

That might cause a conflict.

Try adding a separate button to exit the one. Have one to open the browser and another to exit and see if it still crashes.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 23rd Jul 2013 17:56
Thanks A.L. I'll write my app the way I would expect to see it, and see how things go. Although the code above is from the official AppGameKit documentation. I'm surprised there would be example code on there that causes conflicts. I hate conflicts. In fact, I don't like any kind of breakfast serial.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Jul 2013 18:16 Edited at: 23rd Jul 2013 18:17
The example posted for that command is one that is done by someone in the forum, not by an AppGameKit programmer/document writer.

EDIT: I suspect the moderators test posted examples in the IDE, but not necessarily on a Player.

I just tried my own suggestion. And it failed in both the v1076 and v10815 Players.

But it appears that the OpenBrowser causes a problem in a Player. I vaguely seem to remember that from before.

Maybe someone at TGC can weigh in on this?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 23rd Jul 2013 19:07
Looks like Android requires the protocol (http://) on the URL, I've modified the example to include this.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 23rd Jul 2013 19:21
Aha! Thank you Paul! (Should have thought of that really shouldn't I?)

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Jul 2013 19:53
Thanks Paul.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-05-02 12:15:03
Your offset time is: 2024-05-02 12:15:03