Android Question How to make the Vollume Down/UP keys still work when the device on early suspend?

LUHUANWEI

Member
Licensed User
I want to have an APP to play Media files on Bluetooth earphone, in order to save the power for the phone, I want to switch off the screen and use the Vollume Down/UP keys for controlation, but I don't know how to keep the Vollume Down/UP keys and Bluetooth earphone work when I swith off the display (The phone will get to sleep?).
Thanks in advance.
 

LUHUANWEI

Member
Licensed User
Hi Erel,
Thanks for your help!
I succeed to move the Mediaplayer to as service, but the Vollume Down/UP keys actions can't be obtain by a service. How can I detect Vollume Down/UP keys press from a service?
By the way, could you pls post some samples to show how to use PhoneWakeState?
Thanks.
 
Upvote 0
Top