I am making an application that works based on volume button press, when application is on foreground it detects volume up button pressing and do something. it does not requires to keep the screen on while pressing the button. Is there any way to do this ?
Asked
Active
Viewed 55 times
1 Answers
1
Implement a broadcast reciever which will recive the volume up button action and in its onRecieve() implement your logic.

therealprashant
- 701
- 15
- 27
-
1can you give me an example ? – programr Nov 22 '14 at 09:13
-
Check tutorialspoint.com vogella.com or androidhive.com or developer android.com for broadcastreciver and intentfilter. you will definitly get through – therealprashant Nov 22 '14 at 09:15