2

我希望启动一个接收器\服务,它接收来自耳机按钮的长按并禁用 Google Now 语音识别功能。这是否可能,或者 Google Now 响应是否被硬编码为在 Jelly Bean 之前具有更高的优先级?

谢谢!

4

1 回答 1

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);
    }
于 2013-09-10T09:00:19.950 回答