是否支持Android HFP蓝牙模式? [英] Does android support HFP bluetooth profile?

查看:786
本文介绍了是否支持Android HFP蓝牙模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否支持Android蓝牙HFP的个人资料?或者是依赖于设备?

Does android support Bluetooth HFP profile ? Or is it device dependent ?.

什么是搭载Android在操作系统级支持的配置文件。

What are the profiles supported by Android at the OS level.

推荐答案

下的配置文件是由Android的原生支持:A2DP,HFP,HSP。所谓原生我的意思是,Android是能够传输音频到支持的至少一个这些配置设备。

Next profiles are natively supported by Android: A2DP, HFP, HSP. By "natively" I mean that Android is capable to stream audio to devices that support at least one of these profiles.

处理A2DP和HFP曲线几乎是透明的,你的应用程序。你只播放音频为STREAM_MUSIC连接时,这些设备会偷看不起来。

Handling of A2DP and HFP profiles is almost transparent to your application. You just play audio into STREAM_MUSIC and those devices will peek it up when connected.

及其与HSP配置文件的设备更难。他们官方的API支持API等级8(Android 2.2的),并且你要流音频STREAM_VOICE流:看<一href="http://developer.android.com/reference/android/media/AudioManager.html#startBluetoothSco%28%29"相对=nofollow> AudioManager.startBluetoothSco 了解更多详情。但是,检测是否HSP设备连接仍然不支持(虽然也有变通办法这一点)。

Its much harder with HSP profile devices. Official API support for them was added in API Level 8 (Android 2.2) and you have to stream audio to STREAM_VOICE stream: see AudioManager.startBluetoothSco for more details. But detecting whether HSP device is connect was still officially unsupported (though there are workarounds for this).

在API级别11两个新类分别介绍: BluetoothHeadset BluetoothA2DP 这使生活变得更加容易。这两个类存在于从API级别3机器人,但它们被列入仅在11日发布官方的API(虽然这些类是自第3 API级别翻天覆地的变化)。

In API Level 11 two new classes were introduced: BluetoothHeadset and BluetoothA2DP which make life much easier. These two classes existed in android since API Level 3, but they were included in official API only in 11th release (though these classes were changed dramatically since the 3rd API Level).

这篇关于是否支持Android HFP蓝牙模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆