蓝牙API翻译____①_____android.bluetooth介绍

前言:最近在学习蓝牙开发,借此机会翻译下官网文档中关于蓝牙的部分,然后学习下如何利用蓝牙开发蓝牙聊天软件和文件传输软件,顺便提升自己的英文文档阅读能力。

英文原地址:  http://www.androidcommunitydocs.com/reference/android/bluetooth/package-summary.html

正文:

android.bluetooth包提供了一些管理蓝牙功能的类,例如扫描附近的蓝牙设备、连接设备以及管理设备间的数据传输。

如果需要更详细的信息,可以在下一篇博客中看到。

蓝牙API允许应用:

①扫描其他蓝牙设备。

②通过本地的蓝牙适配器获得配对过的蓝牙设备。

③建立RFCOMM通道/sockets。

④连接其他设备的指定sockets。

⑤在设备间传输数据。

为了用这些AIP来实现蓝牙交流,应用必须声明 BLUETOOTH(Allows applications to connect to paired bluetooth devices)权限。一些额外的功能,例如允许设备查找,需要声明 BLUETOOTH_ADMIN(Allows applications to discover and pair bluetooth devices)权限。

注意:不是所有的安卓设备都支持蓝牙功能。

接口:

BluetoothAdapter.LeScanCallback 低功耗设备查找结果的回调接口。
BluetoothProfile 蓝牙配置的公共API
BluetoothProfile.ServiceListener 客户端连接或断开服务的通知接口

类:

BluetoothA2dp  “A2DP”是Advanced Audio Distribution Profile的缩写。这个类定义了如何把高品质的音频通过蓝牙连接从一个设备流向另一个设备。
BluetoothAdapter  本地蓝牙适配器。作用是查找蓝牙设备、获得配对过的设备、使用Mac地址实例BlueToothDevice对象。
BluetoothAssignedNumbers  Bluetooth Assigned Numbers. 
BluetoothClass  描述了设备的性质和能力。例如指明设备的类型(手机、电脑、耳机),以及它是否有音响和电话的功能。
BluetoothClass.Device  定义了所有的设备类常量。
BluetoothClass.Device.Major  定义了所有重要的设备常量。
BluetoothClass.Service   定义了所有的服务端类常量。
BluetoothDevice   代表了一个远程设备。
BluetoothGatt  Public API for the Bluetooth GATT Profile. 
BluetoothGattCallback  实现 BluetoothGatt 回调的抽象类。
BluetoothGattCharacteristic  Represents a Bluetooth GATT Characteristic

A GATT characteristic is a basic data element used to construct a GATT service, BluetoothGattService.

BluetoothGattDescriptor  Represents a Bluetooth GATT Descriptor

GATT Descriptors contain additional information and attributes of a GATT characteristic, BluetoothGattCharacteristic.

BluetoothGattServer  Public API for the Bluetooth GATT Profile server role. 
BluetoothGattServerCallback  This abstract class is used to implement BluetoothGattServer callbacks. 
BluetoothGattService  Represents a Bluetooth GATT Service

Gatt Service contains a collection of BluetoothGattCharacteristic, as well as referenced services.

BluetoothHeadset  控制蓝牙耳机服务的API
BluetoothHealth  蓝牙相关的健康类应用的API
BluetoothHealthAppConfiguration  BluetoothHealth 类一起使用的蓝牙相关的健康类应用的配置信息。
BluetoothHealthCallback  用来实现 BluetoothHealth 回调的抽象类。
BluetoothManager  高级别的管理者,用来获得BluetoothAdapter 的实例,和控制所有的蓝牙管理。
BluetoothServerSocket  一个监听蓝牙的socket,服务端socket。
BluetoothSocket  一个连接的,或者正在连接之中的socket.。

其中一些难以难以理解的没有翻译,等到学习到那部分时再回来修正补充。

时间: 2024-08-25 20:41:36

蓝牙API翻译____①_____android.bluetooth介绍的相关文章

蓝牙API学习第二发_____Bluetooth介绍

英文原地址为: http://www.androidcommunitydocs.com/guide/topics/connectivity/bluetooth.html 安卓平台包含了对蓝牙协议栈的支持,这允许一个设备与另一个设备进行无线的数据交换.应用程序框架层(Android系统架构四层之一,由上到下分别为应用程序层.应用程序框架层.系统运行库层.Linux内核层)支持通过蓝牙API来使用蓝牙的功能.这些API实现点对和和多点式的无线功能,允许设备无线连接到其他的设备. 使用蓝牙API,应用

Android bluetooth介绍(二): android 蓝牙代码架构及其uart 到rfcomm流程

关键词:蓝牙blueZ  UART  HCI_UART H4  HCI  L2CAP RFCOMM  版本:基于android4.2之前版本 bluez内核:linux/linux3.08系统:android/android4.1.3.4作者:xubin341719(欢迎转载,请注明作者,请尊重版权谢谢)欢迎指正错误,共同学习.共同进步!!一.Android Bluetooth Architecture蓝牙代码架构部分(google 官方蓝牙框架) Android的蓝牙系统,自下而上包括以下一些

Android bluetooth介绍(三): 蓝牙扫描(scan)设备分析

关键词:蓝牙blueZ  A2DP.SINK.sink_connect.sink_disconnect.sink_suspend.sink_resume.sink_is_connected.sink_get_properties.AUDIO.DBUS版本号:基于android4.2之前版本号 bluez内核:linux/linux3.08系统:android/android4.1.3.4作者:xubin341719(欢迎转载.请注明作者.请尊重版权谢谢)欢迎指正错误.共同学习.共同进步!! 參考

【转】Android bluetooth介绍(三): 蓝牙扫描(scan)设备分析

原文网址:http://blog.csdn.net/xubin341719/article/details/38584469 关键词:蓝牙blueZ  A2DP.SINK.sink_connect.sink_disconnect.sink_suspend.sink_resume.sink_is_connected.sink_get_properties.AUDIO.DBUS版本:基于android4.2之前版本 bluez内核:linux/linux3.08系统:android/android4

Android bluetooth介绍(两): android 蓝牙源架构和uart 至rfcomm过程

关键词:蓝牙blueZ  UART  HCI_UART H4  HCI  L2CAP RFCOMM  版本号:基于android4.2先前版本 bluez内核:linux/linux3.08系统:android/android4.1.3.4作者:xubin341719(欢迎转载,请注明作者.请尊重版权谢谢)欢迎指正错误,共同学习.共同进步!! Android bluetooth介绍(一):基本概念及硬件接口Android bluetooth介绍(二): android 蓝牙代码架构及其uart

[翻译] API测试的最佳实践 - 介绍

API测试的最佳实践 - 介绍 在上一篇“是什么让API测试很叼”一文中,我们讨论API与其他形式的软件测试的差异.部分是因为API之间的通信压根就没考虑让你能读懂,纯粹是为了方便计算机之间的交互而设计的.另一部分是由于业务层面上有很多因素影响了API的性能和功能. 当然,值得庆幸的是,你可以参考一些已有的最佳实践,增加你维护API质量的几率.在本章节中,你将学到这些最佳实践.这些最佳实践也是有难易等级的,大体分两类,一类是白色腰带的,适合那些初学API测试的人,一类是黑带,适合有经验的API测

使用内部(com.android.internal)和隐藏(@hide)API[第1部分,介绍]

本文翻译自http://devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-1-introduction/#more-79 Android有两类API在SDK中不能使用. 第一类就是位于包com.android.internal的API,我将这些API称为内部API.第二类API就是用@hide标记的类和函数,虽然严格说这不是一个API而是一系列隐藏API的集合,我仍然假定这是一个API,称为隐藏API. 隐藏API的

Android bluetooth介绍(一):基本概念及硬件接口

关键词:蓝牙硬件接口 UART  PCM  blueZ 版本:基于android4.2之前版本 bluez内核:linux/linux3.08系统:android/android4.1.3.4作者:xubin341719(欢迎转载,请注明作者,请尊重版权谢谢)欢迎指正错误,共同学习.共同进步!! 一.基本概念补充 1.AP:ApplicationProcessor应用处理器 采用ARM架构的CPU,通常负责运行OS和一些特定设置和载入开机预设.比如一个没有电话功能的平板电脑,只跑android或

Android 蓝牙API详解

随着近两年可穿戴式产品逐渐进入人们的生活,蓝牙开发也成为了Android开发的一个重要模块,下面我们就来说一说蓝牙的这些API. 1.蓝牙开发有两个主要的API: BuletoothAdapter:本地蓝牙的适配器,也就是说当前应用程序所运行的Android设备上的蓝牙 BuletoothDevice  : 远程的蓝牙适配器,也就是说你要连接的Android设备的适配器. 2.蓝牙权限 : android.permission.BLUETOOTH : 允许程序连接到已配对的蓝牙设备, 请求连接/