【Bluetooth】Android版本所支持的蓝牙协议code查询

Android版本所支持的蓝牙协议code查询方法:android

  协议配置文件有2个,一个是谷歌源生的,一个是高通本身添加的。app

  优先级:高通 > 谷歌。对于同一种协议会进行覆盖。ui

  

  其中,ture 表明支持,false表明不支持。spa

  

  第一个文件(源生):code

    LINUX/android/packages/apps/Bluetooth/res/values/config.xmlxml

15<resources>
16    <bool name="profile_supported_a2dp">true</bool> 17 <bool name="profile_supported_a2dp_sink">false</bool> 18 <bool name="profile_supported_hdp">true</bool> 19 <bool name="profile_supported_hs_hfp">true</bool> 20 <bool name="profile_supported_hfpclient">false</bool> 21 <bool name="profile_supported_hid">true</bool> 22 <bool name="profile_supported_opp">true</bool> 23 <bool name="profile_supported_pan">true</bool> 24 <bool name="profile_supported_pbap">true</bool> 25 <bool name="profile_supported_gatt">true</bool> 26 <bool name="profile_supported_hidd">true</bool> 27 <bool name="pbap_include_photos_in_vcard">false</bool> 28 <bool name="pbap_use_profile_for_owner_vcard">true</bool> 29 <bool name="profile_supported_map">true</bool> 30 <bool name="profile_supported_avrcp_controller">false</bool> 31 <bool name="profile_supported_sap">false</bool> 32 33 <!-- If true, we will require location to be enabled on the device to 34 fire Bluetooth LE scan result callbacks in addition to having one 35 of the location permissions. --> 36 <bool name="strict_location_check">true</bool> 37</resources>

 

  例如,A2DP/AVRCP/HFP/HSP/HID/PBAP/HDP/OPP/PAN都是支持的。blog

    AVRCP默认支持,profile_supported_avrcp_controller 和AVRCP相比较就是反向的一种控制,能够不支持。get

    profile_supported_hs_hfp 表明HSP/HFP。it

 

 第二个文件(添加的):io

    /LINUX/android/vendor/qcom/opensource/bluetooth/res/values/config.xml

15<resources>
16    <bool name="profile_supported_ftp">true</bool> 17 <bool name="profile_supported_map">false</bool> 18 <bool name="profile_supported_sap">true</bool> 19 <bool name="profile_supported_dun">true</bool> 20</resources>

 

【注意】

  对于协议profile_supported_sap上面两个文件里都有,此时第二个文件会覆盖第一个,也就是该协议 ture。

相关文章
相关标签/搜索