2

I wish to start a reciever\service that recieves the long press from the headset button and disables the Google Now voice recognition feature. Is that possible or is the Google Now response hard-coded to be in higher priority prior to Jelly Bean?

Thanks!

Geva Tal
  • 340
  • 3
  • 14

1 Answers1

0

This is how I have implemented it listening to LongPress of volume key.

@Override
    public boolean onKeyLongPress(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) 
        {
            // do something here
            return true;
        }
        return super.onKeyLongPress(keyCode, event);
    }
Rachit Mishra
  • 6,101
  • 4
  • 30
  • 51