Android Question How to Intercept volume button press when screen off

Albert Lin

Member
Licensed User
Longtime User
Dear all

I would like to run some function after press volume button while screen off.
Could anyone be kind to guide me how to do that? Thanks in advance.


Best Regards
Albert Lin
 

sirjo66

Well-Known Member
Licensed User
Longtime User

I'm sorry to re-open this old thread but I have the same problem and I don't understand what is the right way.

In the link above I don't find the solution, I find "... because broadcast receiver not work when screen light off ...", so I don't understand if it works or not when screen is off

Are you using BroadcastReceiver library ??
Do it works also when screen is off ??
Can you post a little code ??

Many thanks
Sergio
 
Upvote 0
Top