目录
1)profile_supported_a2dp / profile_supported_a2dp_sink
2)profile_supported_avrcp_controller
1.profile是什么?
我也是初学者,不能保证解释通俗易懂,所以为了能深入浅出的让读者明白其概念,不至于误人子弟,我还是抛砖引玉,先用一句话概括一下什么是profile,详细介绍可以参考 《对于蓝牙Profile的理解》,本文侧重说明不同profile的使用场景。
用一句话概括就是:蓝牙的每一个profile对应于一个具体的应用场景,也就是说profile是为了实现某种功能而采用的一组自下而上的协议的称呼。
2.蓝牙中有哪些profile
Android源码中关于蓝牙profile的配置文件路径是 \packages\apps\Bluetooth\res\values\config.xml,内容如下
<resources>
<bool name="profile_supported_a2dp">true</bool>
<bool name="profile_supported_a2dp_sink">false</bool>
<bool name="profile_supported_hdp">true</bool>
<bool name="profile_supported_hs_hfp">true</bool>
<bool name="profile_supported_hfpclient">false</bool>
<bool name="profile_supported_hid">true</bool>
<bool name="profile_supported_opp">true</bool>
<bool name="profile_supported_pan">true</bool>
<bool name="profile_supported_pbap">true</bool>
<bool name="profile_supported_gatt">true</bool>
<bool name="pbap_include_photos_in_vcard">false</bool>
<bool name="pbap_use_profile_for_owner_vcard">true</bool>
<bool name="profile_supported_map">true</bool>
<bool name="profile_supported_avrcp_controller">false</bool>
</resources>
3.不同profile的使用场景
1)profile_supported_a2dp / profile_supported_a2dp_sink
这两个profile是一组,也可以单独配置他们。
profile_supported_a2dp表示媒体音频输出端,也叫source端。(案例:MP3播放器)
profile_supported_a2dp_sink表示媒体音频输入端,也叫sink端。 (案例:音箱)
使用场景:播放设备将音频信息通过蓝牙传输给音箱进行播放,这里的播放设备就是source端,profile_supported_a2dp必须配置为true,这里的音箱就是sink端,profile_supported_a2dp_sink必须配置为true。
2)profile_supported_avrcp_controller
profile_supported_avrcp_controller 表示音乐视频控制协议。(案例:遥控端 )
使用场景:Android平板做为一个音响的功能使用(已经移植 BT 的 a2dp sink 的功能),现在需要加上平板控制手机的声音播放,暂停,音量大小等功能,这时平板就需要用到profile_supported_avrcp_controller协议,并且配置为true.
3)其它(尽情期待...)
后续有时间会继续增加,尽情期待...