Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
3b16000b
D
Docs
项目概览
OpenHarmony
/
Docs
接近 2 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3b16000b
编写于
8月 03, 2023
作者:
L
lverpeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
补充修改
Signed-off-by:
N
lverpeng
<
lverpeng118@163.com
>
上级
89aac2ed
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
22 addition
and
8 deletion
+22
-8
zh-cn/application-dev/reference/apis/js-apis-bluetooth-baseProfile.md
...ation-dev/reference/apis/js-apis-bluetooth-baseProfile.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-bluetooth-ble.md
...n/application-dev/reference/apis/js-apis-bluetooth-ble.md
+4
-4
zh-cn/application-dev/reference/apis/js-apis-bluetooth-pan.md
...n/application-dev/reference/apis/js-apis-bluetooth-pan.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-bluetooth.md
zh-cn/application-dev/reference/apis/js-apis-bluetooth.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-bluetoothManager.md
...pplication-dev/reference/apis/js-apis-bluetoothManager.md
+1
-0
zh-cn/application-dev/reference/apis/js-apis-system-bluetooth.md
...pplication-dev/reference/apis/js-apis-system-bluetooth.md
+1
-1
zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-bluetooth.md
...es/changelogs/OpenHarmony_4.0.9.2/changelogs-bluetooth.md
+13
-0
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-bluetooth-baseProfile.md
浏览文件 @
3b16000b
...
...
@@ -358,7 +358,7 @@ try {
off(type: 'connectionStateChange', callback?: Callback
<
[StateChangeParam](#StateChangeParam)
>
): void
取消订阅
a2dp
连接状态变化事件。
取消订阅连接状态变化事件。
**需要权限**
:ohos.permission.ACCESS_BLUETOOTH
...
...
zh-cn/application-dev/reference/apis/js-apis-bluetooth-ble.md
浏览文件 @
3b16000b
# @ohos.bluetooth.ble (蓝牙ble模块)
ble模块提供了
访问蓝牙个人区域网相关功能
的方法。
ble模块提供了
对蓝牙操作和管理
的方法。
> **说明:**
>
...
...
@@ -19,7 +19,7 @@ import ble from '@ohos.bluetooth.ble';
createGattServer(): GattServer
创建Gatt
profile
实例。
创建Gatt
Server
实例。
**系统能力**
:SystemCapability.Communication.Bluetooth.Core。
...
...
@@ -27,7 +27,7 @@ createGattServer(): GattServer
| 类型 | 说明 |
| ----------------------------- | ---------- |
| GattServer | 返回一个
JavaScript
Gatt服务的实例。 |
| GattServer | 返回一个Gatt服务的实例。 |
**示例:**
...
...
@@ -2210,7 +2210,7 @@ try {
off(type: 'BLEMtuChange', callback?: Callback
<
number
>
): void
订阅Mtu状态变化事件。
取消
订阅Mtu状态变化事件。
**需要权限**
:ohos.permission.ACCESS_BLUETOOTH
...
...
zh-cn/application-dev/reference/apis/js-apis-bluetooth-pan.md
浏览文件 @
3b16000b
# @ohos.bluetooth.pan (蓝牙
socket
模块)
# @ohos.bluetooth.pan (蓝牙
pan
模块)
pan模块提供了访问蓝牙个人区域网相关功能的方法。
...
...
zh-cn/application-dev/reference/apis/js-apis-bluetooth.md
浏览文件 @
3b16000b
...
...
@@ -4,7 +4,7 @@
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 从API Version 9
开始,该接口不再维护,推荐使用新接口[bluetoothManager](js-apis-bluetoothManager.md)
。
> 从API Version 9
开始,该接口不再维护,推荐使用[`@ohos.bluetooth.ble`](js-apis-bluetooth-ble.md)等相关profile接口
。
...
...
zh-cn/application-dev/reference/apis/js-apis-bluetoothManager.md
浏览文件 @
3b16000b
...
...
@@ -5,6 +5,7 @@
> **说明:**
>
> 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 从API Version 10 开始,该接口不再维护,推荐使用[`@ohos.bluetooth.ble`](js-apis-bluetooth-ble.md)等相关profile接口。
...
...
zh-cn/application-dev/reference/apis/js-apis-system-bluetooth.md
浏览文件 @
3b16000b
...
...
@@ -3,7 +3,7 @@
> **说明:**
>
> - 从API Version 7 开始,该接口不再维护,推荐使用
新接口[`@ohos.bluetooth`](js-apis-bluetooth.md)
。
> - 从API Version 7 开始,该接口不再维护,推荐使用
[`@ohos.bluetooth.ble`](js-apis-bluetooth-ble.md)等相关profile接口
。
>
> - 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
...
...
zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-bluetooth.md
浏览文件 @
3b16000b
...
...
@@ -200,10 +200,23 @@
|@ohos.bluetooth.ble|
[
deviceName
](
../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#scanresult
)
|
|@ohos.bluetooth.ble|
[
includeDeviceName
](
../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#advertisedata
)
|
|@ohos.bluetooth.ble|
[
GattProperties
](
../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#gattproperties
)
|
|@ohos.bluetooth.ble|
[
setCharacteristicChangeIndication(characteristic: BLECharacteristic, enable: boolean, callback: AsyncCallback<void>): void
](
../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#setcharacteristicchangeindication
)
|
|@ohos.bluetooth.ble|
[
setCharacteristicChangeIndication(characteristic: BLECharacteristic, enable: boolean): Promise<void>
](
../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#setcharacteristicchangeindication-1
)
|
|@ohos.bluetooth.ble|
[
on(type: 'BLEMtuChange', callback: Callback<number>): void
](
../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#onblemtuchange
)
|
|@ohos.bluetooth.ble|
[
off(type: 'BLEMtuChange', callback?: Callback<number>): void
](
../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#offblemtuchange
)
|
|@ohos.bluetooth.connection|
[
pinType
](
../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#pintype
)
|
|@ohos.bluetooth.connection|
[
BluetoothTransport
](
../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#bluetoothtransport
)
|
|@ohos.bluetooth.constant|
[
ProfileUuids
](
../../../application-dev/reference/apis/js-apis-bluetooth-constant.md#profileuuids
)
|
### 补充promise调用方式
| 模块名 |新增声明 |
| ------------- |-------------------------------------------------------- |
|@ohos.bluetooth.ble|
[
notifyCharacteristicChanged(deviceId: string, notifyCharacteristic: NotifyCharacteristic): Promise<void>
](
../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#notifycharacteristicchanged-1
)
|
|@ohos.bluetooth.ble|
[
writeCharacteristicValue(characteristic: BLECharacteristic, writeType: GattWriteType): Promise<void>
](
../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#writecharacteristicvalue-1
)
|
|@ohos.bluetooth.ble|
[
writeDescriptorValue(descriptor: BLEDescriptor): Promise<void>
](
../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#writedescriptorvalue-1
)
|
|@ohos.bluetooth.ble|
[
setCharacteristicChangeNotification(characteristic: BLECharacteristic, enable: boolean): Promise<void>
](
../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#setcharacteristicchangenotification-1
)
|
**适配指导**
注意根据不同profile模块选择import方式,部分接口需要import多个TS文件。
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录