I thought we talked about this somewhere but I can't find it. So here is the question: How can I hook my app into the "back" button on an Android device? The current action is to exit the Gideros App.
Back button on android can switch to previous Activity, since Gideros (atleast I think) is using only one main activity, you can't switch to previous one.
I'm might be completely wrong about it, please correct me, but well it what it looks like to me right now.
Well it would make sense to create new Activity for every new window, but since it is actually always one window (one stage) and eveything is manipulated with sprites (even scenes) it sounds impossible to implement creating new Activities, not even talking about crossplatform part (dunno what IOS thinks about it). So I guess they can't be implemented by design
Yes, overriding and catching the back button event is important for a usable android game. Most probably we'll introduce a new Keyboard class with the next release. Maybe disabling the back button can be a temporary option?
@atilim - I'm thinking hooking into the back button and having a keyboard class are two different features (both of which I'm looking for ) What did you mean?
currently,I hook it in the java code and just popup a confirm exit game dialog. I think it would be better if @atilim can hook it in the scenemanager and do some navigation based on a stack.
@chipster123 With Keyboard I mean the physical buttons (back, search, menu, dpad, etc) on Android devices, not the Virtual Keyboard. Maybe I should think about a better class name
Comments
Back button on android can switch to previous Activity, since Gideros (atleast I think) is using only one main activity, you can't switch to previous one.
I'm might be completely wrong about it, please correct me, but well it what it looks like to me right now.
@atilim can hook it in the scenemanager and do some navigation based on a stack.
https://sites.google.com/site/xraystudiogame
@chipster123 With Keyboard I mean the physical buttons (back, search, menu, dpad, etc) on Android devices, not the Virtual Keyboard. Maybe I should think about a better class name