And why the 'home' key closes my application instead of hiding it?
Suppose, I am in game scene and I want to close my scene and return to level selection. I press back key and now I am in level selection scene. I don't want to play more and I press 'back' key again to go to main menu. When I am in main menu, pressing 'back' key should close my game. This is standard behaviour for android devices.
How can I achieve this with Gideros?
Comments
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
you can also take a look at keyboard example shipped with installation ( examples --> hardware --> keyboard
Thus back button is disabled, so you could imitate it's functionality inside your app by catching event and responding correctly (exiting app or going to previous scene).
Check keyboard example from Gideros examples
Dislikes: devex
I missed keyboard example.
It's that i need.
thx
end
local function onKeyUp(event)
if event.keyCode == KeyCode.BACK then
----- Your function
end
end
stage:addEventListener(Event.KEY_DOWN, onKeyDown)
stage:addEventListener(Event.KEY_UP, onKeyUp)