ty.device.postBLEBigDataChannelWithProgress
大数据通道操作,支持进度反馈
需引入
DeviceKit,且在>=3.0.0版本才可使用
参数
Object object
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| deviceId | string |
是 | deviceId 设备 id | |
| requestParams | any |
是 | 建立数据传输所需相关参数 command:通道操作的具体指令;start/stop:开启/关闭大数据通道;type:要上传的数据类型 requestParams 通道指令集 { "command": "start", "type": "1" } | |
| complete | function |
否 | 接口调用结束的回调函数(调用成功、失败都会执行) | |
| success | function |
否 | 接口调用成功的回调函数 | |
| fail | function |
否 | 接口调用失败的回调函数 |
object.success 回调参数
参数
Object res
| 属性 | 类型 | 说明 |
|---|---|---|
| deviceId | string |
deviceId 设备 id |
| resultParams | any |
数据传输完毕相关参数(type dps fileUrl) resultParams 数据传输完毕相关参数 |
object.fail 回调参数
参数
Object res
| 属性 | 类型 | 说明 |
|---|---|---|
| errorMsg | string |
插件错误信息 |
| errorCode | string |
错误码 |
| innerError | object |
插件外部依赖错误信息 {errorMsg: string, errorCode: string } |
ty.device.postBLEFileTransfer
传输文件到蓝牙设备
需引入
DeviceKit,且在>=3.0.0版本才可使用
参数
Object object
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| deviceId | string |
是 | 设备模型 设备 id | |
| fileId | number |
是 | 文件 id | |
| fileIdentifier | |

本文详细介绍了DeviceKit库在iOS中的功能,包括操作大数据通道、文件传输至蓝牙设备、透传数据发送、扫描设备、连接状态监听等,以及涉及的回调函数和版本要求。
最低0.47元/天 解锁文章
1092

被折叠的 条评论
为什么被折叠?



