前言
记录一下Android Car模式下ACTION_HARDKEY_EVENT_REPORT接收按键值(KEYCODE_MEDIA_PREVIOUS,KEYCODE_MEDIA_NEXT,KEYCODE_CALL等)的使用。
记录于此,方便自己回顾。
正文
下面是不分日志打印:
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
参考文章
© 版权声明