Reputation: 1
I am trying to work out a solution here. I am currently developing an App that streams live recordings. If the User manually changes the Volume Control Keys, I would like this change to notify the App and reflect/update this change on the Virtual Volume Slider Bar in the App?
Upvotes: 0
Views: 187
Reputation: 4387
I would probobally do this:
public boolean onKeyDown(int keyCode, KeyEvent event)
{
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN || keyCode ==KeyEvent.KEYCODE_VOLUME_UP) {
//get the cur volume, set your on screen to this volume
} else {
return super.onKeyDown(keyCode, event);
}
}
Upvotes: 1