Android hardware buttons

Does Corona support Android devices hardware buttons (back,menu,search,home)?? I saw discussion that Corona might support it now. So does it support or not? I havent seen anywhere sample code or something how to use these buttons. I just need to code back button to change scene. I am using director.

Has anyone any information??

Currently Corona does not support Android buttons. It's on their roadmap though, so hopefully support will come in the near future!

+1 for android hardware buttons, especially back.

It boggles the mind how a standard feature on every android phone was not implemented from the start in this SDK. Hopefully they get this available to subscribers and non-subscribers as soon as possible. I'm not paying for a subscription that doesn't support such a basic feature.

In the short-term, is there any other workaround that allows us to detect that our application has dropped into background or otherwise shut it down, so that it doesn't continue to show up in the "running" list of applications?

Cheers -- Tim.

Here is some code from Jon Beebe. It kills the process after a user exits an application.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local onSystem = function( event )
                if event.type == "applicationSuspend" then
 
                        if gameIsActive then
                                gameIsActive = false
                                physics.pause()
                        end
 
                elseif event.type == "applicationExit" then
                        if system.getInfo( "environment" ) == "device" then
 
                                os.exit()
                        end
                end
        end

Alternativly you can catch the suspend event and save your state to disk - then read it on next start.

views:1699 update:2011/10/8 15:12:54
corona forums © 2003-2011