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

介绍了Android版本支持的蓝牙协议code查询方法。协议配置文件有谷歌源生和高通添加的两个,优先级高通高于谷歌,同协议会覆盖。给出两个文件路径,还提到特定协议在两文件都有时,第二个文件会覆盖第一个。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

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

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

  

  其中,ture 代表支持,false代表不支持。

  

  第一个文件(源生):

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

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都是支持的。

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

    profile_supported_hs_hfp 代表HSP/HFP。

 

 第二个文件(添加的):

    /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。

 

转载于:https://www.cnblogs.com/zhuwei0901-yanwu/p/9559142.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值