In my android project,I want to run my application application when my volume button is clicked.But when I click volume button for media player or brightness change I don't want to run my application.How can I achieve this?
Asked
Active
Viewed 159 times
0
-
you have to use broadcast manager to do that – Divyesh Patel Jun 15 '17 at 06:59
-
But I have to consider cases of media player – Aparna Jun 15 '17 at 07:09
-
how can device differentiate when you want to change brightness and when to run app.?? – Divyesh Patel Jun 15 '17 at 07:12
-
check [this](https://stackoverflow.com/a/21087442/5545429) – shinilms Jun 15 '17 at 07:18