Android
bluetooth android
bluetooth 提供了皆如扫描设备、连接设备以及对设备间的数据传输进行管理的类,这些类对蓝牙设备进行功能性管理
蓝牙模块 API 提供的应用包括了: ●扫描其它蓝牙设备 ●通过查询本地蓝牙适配器来匹配蓝牙设备 ●建立 RFCOMM(无线射频通信协议)的通道/端口 ●从其他的蓝牙设备中连接到指定的端口 ●传输数据到其他设备,或者从其他设备中接收数据 如需运用这些 API 来执行蓝牙通信,应用程序必须声明 BLUETOOTH 许可
对于皆如寻找设备请求等的一些附加功能,也同样需要 BLUETOOTH_ADMIN 许可
如需要使用蓝牙 API 的更详细的指引,参看 Bluetooth Dev Guide topic
Classes BluetoothAdapter 代表本地的蓝牙适配器设备 BluetoothClass 代表一个描述了设备通用特性和功能的蓝牙类 BluetoothClass
Device 定义了所有设备类的常量 BluetoothClass
Device
Major 定义了所有主要设备类的常量 BluetoothClass
Service 定义了所有服务类的常量 BluetoothDevice 代表一个远程的蓝牙设备 BluetoothServerSocket 监听蓝牙服务的端口 BluetoothSocket 一个双向连接的蓝牙端口 public final class BluetoothAdapter extends Object java
Object ↳ android
bluetooth
BluetoothAdapter Class Overview 代表本地的蓝牙适配器设备
BluetoothAdapter 类让用户能执行基本的蓝牙任务
例如:初始化设备的搜索,查询可匹配的设备集,