前言

记录一下Android Car模式下ACTION_HARDKEY_EVENT_REPORT接收按键值(KEYCODE_MEDIA_PREVIOUS,KEYCODE_MEDIA_NEXT,KEYCODE_CALL等)的使用。

记录于此,方便自己回顾。

正文

隐藏内容!
付费阅读后才能查看!
4
6
多个隐藏块只需支付一次

下面是不分日志打印:

KeyEventReceiver: onReceive intent : Intent { act=android.car.input.action.HARDKEY_EVENT_REPORT flg=0x10 (has extras) }
KeyEventReceiver: onReceive action : android.car.input.action.HARDKEY_EVENT_REPORT
KeyEventReceiver: KeyEventReceiver receive, keyCode = 87, isDown = true, isLongPress = false
KeyEventReceiver: onReceive intent : Intent { act=android.car.input.action.HARDKEY_EVENT_REPORT flg=0x10 (has extras) }
KeyEventReceiver: onReceive action : android.car.input.action.HARDKEY_EVENT_REPORT
KeyEventReceiver: KeyEventReceiver receive, keyCode = 87, isDown = false, isLongPress = false
KeyEventReceiver: onReceive intent : Intent { act=android.car.input.action.HARDKEY_EVENT_REPORT flg=0x10 (has extras) }
KeyEventReceiver: onReceive action : android.car.input.action.HARDKEY_EVENT_REPORT
KeyEventReceiver: KeyEventReceiver receive, keyCode = 164, isDown = true, isLongPress = false
KeyEventReceiver: onReceive intent : Intent { act=android.car.input.action.HARDKEY_EVENT_REPORT flg=0x10 (has extras) }
KeyEventReceiver: onReceive action : android.car.input.action.HARDKEY_EVENT_REPORT
KeyEventReceiver: KeyEventReceiver receive, keyCode = 164, isDown = false, isLongPress = false
KeyEventReceiver: onReceive intent : Intent { act=android.car.input.action.HARDKEY_EVENT_REPORT flg=0x10 (has extras) }
KeyEventReceiver: onReceive action : android.car.input.action.HARDKEY_EVENT_REPORT
KeyEventReceiver: KeyEventReceiver receive, keyCode = 5, isDown = true, isLongPress = false
KeyEventReceiver: onReceive intent : Intent { act=android.car.input.action.HARDKEY_EVENT_REPORT flg=0x10 (has extras) }
KeyEventReceiver: onReceive action : android.car.input.action.HARDKEY_EVENT_REPORT
KeyEventReceiver: KeyEventReceiver receive, keyCode = 5, isDown = false, isLongPress = false

参考文章

相关文章

暂无评论

none
暂无评论...