• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Can you utilize the volume buttons for an app?

Kamil1232

Lurker
I am thinking of developing an app for android but I would like to know if you can make say one of the volume buttons do a specific action for your app (I am thinking the app will run in the background and double clicking the volume down button would activate it)
 
Sure, tasker can do that (indirectly). It can respond to a change of any/all of the Android volume variables (media volume, ringer volume, call volume, alarm volume etc depending on context). If you want "double click" of volume, you could program the logic in tasker to respond (only) to two decreases of the same volume variable in a short period of time. You could perhaps add some logic to restore volume to what it was before the double volume down. This wouldn't work if volume was already at/near the minimum.
 
Back
Top Bottom