Hi,
I’m making my 1st Android app but I meet two problems about keys wich I listen like that :
[lua]local function onKeyEvent(evt)
if evt.phase==“down” and evt.keyName==“back” then
–go back to the menu
end
return true
end
Runtime:addEventListener(“key”,onKeyEvent)[/lua]
-
When I click on the “back” button of the simulator nothing happen.
-
When testing on the device, the back button is correclty handled but the volume keys are disabled ! So, I changed “return true” by “return false” and now volume keys are enabled but the back button quit the application (instead of going back to the menu).
So, what I must return ??
Thanks to help me
[import]uid: 107239 topic_id: 22260 reply_id: 322260[/import]