I am trying to recognize when the user presses the volume rockers when the screen is off to update an activity. From what I've read, BroadcastReceivers (I think) don't work when the phone is asleep, and so the only way to do this is to keep the activity running using a PARTIAL_WAKE_LOCK. My app is a basic one that shouldn't use too much battery, but I'm concerned that using a PARTIAL_WAKE_LOCK might drain the battery (which defies the purpose of recognizing button presses when the screen is off).
Would the PARTIAL_WAKE_LOCK actually be an issue for a basic app? If so, what is the best way to go about doing this, and if not, what is the best way to use the PARTIAL_WAKE_LOCK (i.e. when should I acquire/release it)?
Thanks in advance.