bluetooth子系统ChangeLog
cl.bluetooth.1 蓝牙模块新增接口,属性及枚举
变更影响
新增接口,提供通过非蓝牙扫描的方式(例如NFC等)获取到外设的地址,发起配对的能力;支持profile的连接管理设置能力等。
关键接口/组件变更
模块名 |
新增声明 |
@ohos.bluetoothManager |
pairCredibleDevice(deviceId: string, transport: BluetoothTransport, callback: AsyncCallback<void>): void |
@ohos.bluetoothManager |
pairCredibleDevice(deviceId: string, transport: BluetoothTransport): Promise<void> |
@ohos.bluetoothManager |
getRemoteProfileUuids(device: string, callback: AsyncCallback<Array<ProfileUuids>>): void |
@ohos.bluetoothManager |
getRemoteProfileUuids(device: string): Promise<Array<ProfileUuids>> |
@ohos.bluetoothManager |
getLocalProfileUuids(callback: AsyncCallback<Array<ProfileUuids>>): void |
@ohos.bluetoothManager |
getLocalProfileUuids(): Promise<Array<ProfileUuids>> |
@ohos.bluetoothManager |
setDevicePinCode(device: string, code: string, callback: AsyncCallback<void>): void |
@ohos.bluetoothManager |
setDevicePinCode(device: string, code: string): Promise<void> |
@ohos.bluetoothManager |
setConnectionStrategy(device: string, strategy: ConnectionStrategy, callback: AsyncCallback<void>): void |
@ohos.bluetoothManager |
setConnectionStrategy(device: string, strategy: ConnectionStrategy): Promise<void> |
@ohos.bluetoothManager |
getConnectionStrategy(device: string, callback: AsyncCallback<ConnectionStrategy>): void |
@ohos.bluetoothManager |
getConnectionStrategy(device: string): Promise<ConnectionStrategy> |
@ohos.bluetoothManager |
ConnectionStrategy |
@ohos.bluetoothManager |
properties |
@ohos.bluetoothManager |
deviceName |
@ohos.bluetoothManager |
includeDeviceName |
@ohos.bluetoothManager |
GattProperties |
@ohos.bluetoothManager |
pinType |
@ohos.bluetoothManager |
BluetoothTransport |
@ohos.bluetoothManager |
ProfileUuids |
适配指导
请参考各新增接口文档下的示例。