views:

73

answers:

1

I'm looking for a way for a user of my android application to specify a hardware button (be it scrollbutton click, any of the volume buttons, optional camera button, etc) and the ability to create a global 'hotkey' to this hardware button even when my application is in the background or the screen is locked.

Is this possible at all? If it isn't, what would be a decent alternative (measuring proximity perhaps)?

Some clarification: It's a VOIP based application, where there is no continuous transmission. While we do intend to support voice activation at some point, we also want used to use a 'push to talk' key even when they have their screens disabled or are running another app.

edit:

This application seems to be able to reassign the search / camera buttons to launch some other application: http://www.androlib.com/android.application.com-socialnmobile-buttonshortcuts-qFB.aspx

But how did they make it work without the app being in the foreground? And screen locking is still an issue (I know you can disable this, but is it possible to work around this too?)

Anyone? I wish I could put a bounty on this question.

A: 

How about doing something similar to what Android launcher do. When you install a custom launcher e.g ADWLauncher, the first time you press Home button - you will be asked on what launcher you're trying to run, and you can set it as default.

Since this is a VOIP application, I'm assuming that you want to do something similar to what Google Voice apps did?

LawrenceGS