Hi,

I am new to android apps and I am trying to figure out a way to keep
an application in foreground running, getting input from the hardware
keys only (like volume up and down) but without turning on the screen
or unlocking.

I mean lets say you aquire a nice cpu partial wakelock to do your
staff, you run an app for chating like a walkie talkie and you want
the user to be able to respond to audio messages by pressing the
volume up and talking.

You can;t have the screen on all the time, it is draining the battery
and you can;t have screen lighting or diming on every hard click.

You also cant use the camera button if you don;t have one, and the
media button is only available when using a handsfree. Still you have
to open the screen, disable the keyguard, bring the app to foreground
if not already and then receive input from the hard key pressed. So
how can I protect the touchscreen or at least turn off the screen but
disable the keyguard after the timeout to save battery?

I 've seen apps locking the hard keys and not the touchscreen but
there is no documentation or availability on turning off the screen
light with keyguard locking only the touchscreen leaving the hard keys
to the foreground application.

Please note that many of the devices do not push buttons so easilly
and are on pockets inside cases with holes that allow the user to
press buttons but those are not easilly pressed in pocket.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to