从android中的bluetoot耳机听主按钮点击?

时间:2015-05-29 21:47:17

标签: android events bluetooth click headset

是否有方法从简单(非媒体)蓝牙耳机听主按钮点击?我想将它用于即按即说的inapp操作。

Jabra BT2050 main button

我试过了some examples,但事件未被解雇。 Bluetooth Launch应用也不行。有可能吗?

按下主按钮

时出现在日志中
3601-3704/? E/bt-rfcomm﹕ PORT_DataInd, p_port:0xa2c3835c, p_data_co_callback is null
3601-3704/? D/bt-btif﹕ bta_ag_hdl_event: p_scb 0xa2c40abc
3601-3704/? D/bt-btif﹕ AG evt (hdl 0x0001): State 2, Event 0x050b
  866-883/? I/art﹕ Explicit concurrent mark sweep GC freed 144419(6MB) AllocSpace objects, 2(1566KB) LOS objects, 33% free, 26MB/40MB, paused 1.374ms total 143.531ms
3601-3704/? D/bt-btif﹕ bta_ag_rfc_data, change link policy for SCO
3601-3657/? D/bt-btif﹕ btif_hf_upstreams_evt: event=BTA_AG_AT_CKPD_EVT
3601-3678/? D/HeadsetStateMachine﹕ AudioOn process message: 101, size: 1
3601-3678/? D/HeadsetStateMachine﹕ event type: 16
1475-1512/? I/Telecom﹕ BluetoothPhoneService: BT - hanging up call
1475-1475/? D/Telecom﹕ BluetoothPhoneService: handleMessage(2) w/ param 0

按下音量+

时出现在日志中
3601-3704/? E/bt-rfcomm﹕ PORT_DataInd, p_port:0xa2c3835c, p_data_co_callback is null
3601-3704/? D/bt-btif﹕ bta_ag_hdl_event: p_scb 0xa2c40abc
3601-3704/? D/bt-btif﹕ AG evt (hdl 0x0001): State 2, Event 0x050b
3601-3657/? D/bt-btif﹕ btif_hf_upstreams_evt: event=BTA_AG_SPK_EVT
3601-3678/? D/HeadsetStateMachine﹕ AudioOn process message: 101, size: 1
3601-3678/? D/HeadsetStateMachine﹕ event type: 6
3601-3704/? D/bt-btif﹕ bta_ag_rfc_data, change link policy for SCO
  337-337/? D/compress_voip﹕ voice_extn_compress_voip_out_get_parameters: enter
  337-337/? D/audio_hw_extn﹕ audio_extn_get_parameters: returns
  337-337/? I/str_params﹕ key: 'bt_headset_vgs' value: ''
3601-3678/? D/HeadsetStateMachine﹕ AudioOn process message: 7, size: 1

按下音量时出现在日志中 -

3601-3704/? E/bt-rfcomm﹕ PORT_DataInd, p_port:0xa2c3835c, p_data_co_callback is null
3601-3704/? D/bt-btif﹕ bta_ag_hdl_event: p_scb 0xa2c40abc
3601-3704/? D/bt-btif﹕ AG evt (hdl 0x0001): State 2, Event 0x050b
3601-3657/? D/bt-btif﹕ btif_hf_upstreams_evt: event=BTA_AG_SPK_EVT
3601-3678/? D/HeadsetStateMachine﹕ AudioOn process message: 101, size: 1
3601-3678/? D/HeadsetStateMachine﹕ event type: 6
3601-3704/? D/bt-btif﹕ bta_ag_rfc_data, change link policy for SCO
337-1032/? D/compress_voip﹕ voice_extn_compress_voip_out_get_parameters: enter
337-1032/? D/audio_hw_extn﹕ audio_extn_get_parameters: returns
337-1032/? I/str_params﹕ key: 'bt_headset_vgs' value: ''
3601-3678/? D/HeadsetStateMachine﹕ AudioOn process message: 7, size: 1

设备:采用Android 5.0.2和Jabra BT2050蓝牙耳机的Sony Tablet Z2(仅限WIFI)。

0 个答案:

没有答案