One (or maybe two) more questions from me, I really appreciate the supportive nature of these forums, thank you for all your help!
How do you deal with your android games losing focus? If I switch to another app during my game, then when returning the game starts back on the main menu. I figure I need to use GLB_ON_PAUSE and GLB_ON_RESUME. Do I have to save all the variables and current game state to an .ini file or similar in GLB_ON_PAUSE then load it all in GLB_ON_RESUME or is there a simpler approach?
One other unrelated question: is there a way to add a hyperlink from my app to open a webpage in the browser?
Thanks,
Matt.
maybe this? :
AUTOPAUSE FALSE
Quote from: Schranz0r on 2012-Sep-02
maybe this? :
AUTOPAUSE FALSE
Thanks for the reply. I gave this a try, but the app just freezes with a black screen when I return to it.
Task switching in Android is not fully support in 10.283. I think it is in the beta of V11, but never got around to testing it.
More about it here : http://www.glbasic.com/forum/index.php?topic=7901.msg66011#msg66011
GLB_ON_RESUME is never invoked. This due neither onWindowFocusChanged() or onResume() is called in SDLActivity.java on resume. They only works if you leave the device and close its self.
Same behavier in v10 and the early v11 beta.
So until this got fixed, you should save when pause is invoked, which does call just before quit.
Thanks for the replies.
Quote from: planetm on 2012-Sep-02
is there a way to add a hyperlink from my app to open a webpage in the browser?
Can anybody answer this question from my original post? I would like to add a couple of hyperlinks from my android app to various websites. How can I do it?
Thanks again,
Matt.
The "easiest" way would be to use a font where all characters are underlined. Detect a click between the x,y -> width, height and then call NETWEBEND
Thanks MrTAToad, don't know why i didn't find NETWEBEND myself :S