1

I am trying to port my Android app to the BlackBerry 10, and the detection of the Volume Key press does not seem to work - the key press does not result in my code getting invoked. Here's my code snippet:

public boolean onKeyDown(int keyCode, KeyEvent event)  { 
   if (keyCode == KeyEvent.KEYCODE_VOLUME_UP || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) { 
       // We override the volume key to trigger a special event in our app 
       return true;
   } else {
       return super.onKeyDown(keyCode, event); 
   }
}

That code above works on an Android phone.

Is there another way for an Android app on BB10 to detect the Volume key press?

Vince Lasmarias
  • 738
  • 6
  • 8

1 Answers1

2

Apparently detecting the Volume Key press is not supported even for the Native BB10 platform - from the BlackBerry support forums

Vince Lasmarias
  • 738
  • 6
  • 8