ui - blockdate/ios-rn-sdk GitHub Wiki
本地原生业务页面访问与处理
Export:
Example
import {Host} from 'miot'
...
//删除设备
Host.ui.openDeleteDevice()
//分享设备
Host.ui.openShareDevicePage-
miot/host/ui
-
static
- .openDeleteDevice([title])
- .openShareDevicePage()
- .keepScreenNotLock(flag)
- .openRoomManagementPage()
- .openVoiceCtrlDeviceAuthPage()
- .openIftttAutoPage()
- .openFeedbackInput()
- .openSecuritySetting()
- .openHelpPage()
- .openShareListBar(title, description, imagePath, url)
-
.getDevicesWithModel(model) ⇒
Promise.<Array.<devices>> - .openBtGatewayPage()
- .privacyAndProtocolReview(licenseTitle, licenseUrl, policyTitle, policyUrl)
-
.openPrivacyLicense(licenseTitle, licenseUrl, policyTitle, policyUrl) ⇒
Promise - .openChangeDeviceName()
- .openAddToDesktopPage()
- .openDeviceUpgradePage()
- .openDeviceTimeZoneSettingPage()
- .openWebPage(url)
- .openShopPage(gid)
- .openAddDeviceGroupPage()
- .openEditDeviceGroupPage(dids-)
- .openTimerSettingPage(onMethod, onParam, offMethod, offParam)
- .openTimerSettingPageWithCustomIdentifier(customTimerIdentifier, onMethod, onParam, offMethod, offParam)
- .openTimerSettingPageWithVariousTypeParams(onMethod, onParam, offMethod, offParam)
-
.openDevice(did, model) ⇒
Promise.<json> - .openPageWithClassName(className)
- .openNewMorePage()
-
inner
-
~getDevicesWithModelCallback :
function
-
~getDevicesWithModelCallback :
-
static
弹出删除设备的对话框
Kind: static method of miot/host/ui
| Param | Type | Default | Description |
|---|---|---|---|
| [title] | string |
null |
自定义提示,不设置使用默认提示 |
打开分享设备的页面
Kind: static method of miot/host/ui
是否保持屏幕常亮
Kind: static method of miot/host/ui
| Param | Type | Description |
|---|---|---|
| flag | Boolean |
默认false |
打开房间设备管理的页面
Kind: static method of miot/host/ui
打开语音设备管理的页面
Kind: static method of miot/host/ui
打开添加智能的页面
Kind: static method of miot/host/ui
打开反馈页
Kind: static method of miot/host/ui
打开安全管理页
Kind: static method of miot/host/ui
打开常见问题页,别名「使用帮助」
Kind: static method of miot/host/ui
打开分享列表页面
Kind: static method of miot/host/ui
| Param | Type | Description |
|---|---|---|
| title | string |
|
| description | string |
|
| imagePath | string |
和Image source 一样的格式 |
| url | string |
获取设备列表中指定model的设备信息
Kind: static method of miot/host/ui
| Param | Type | Description |
|---|---|---|
| model | string |
设备model |
打开蓝牙网关页
Kind: static method of miot/host/ui
查看软件政策和隐私协议
Kind: static method of miot/host/ui
| Param | Type | Description |
|---|---|---|
| licenseTitle | string |
|
| licenseUrl | string |
require('资源的相对路径') |
| policyTitle | string |
|
| policyUrl | string |
require('资源的相对路径') |
软件政策和隐私协议授权
Kind: static method of miot/host/ui
| Param | Type | Description |
|---|---|---|
| licenseTitle | string |
|
| licenseUrl | string |
require('资源的相对路径') |
| policyTitle | string |
|
| policyUrl | string |
require('资源的相对路径') |
打开重命名对话框
Kind: static method of miot/host/ui
添加桌面快捷方式
Kind: static method of miot/host/ui
打开设备检查固件升级页
Kind: static method of miot/host/ui
打开设备时区设置页
Kind: static method of miot/host/ui
打开H5页面
Kind: static method of miot/host/ui
| Param | Type | Description |
|---|---|---|
| url | string |
链接地址 |
打开商城某商品详情页面
Kind: static method of miot/host/ui
| Param | Type | Description |
|---|---|---|
| gid | string |
商品ID |
打开创建设备组页 只有特定设备支持创建设备组统一管理
Kind: static method of miot/host/ui
Kind: static method of miot/host/ui
| Param | Type | Description |
|---|---|---|
| dids- | Array |
包含组设备did的数组 |
这个api 应该可以废弃了
Kind: static method of miot/host/ui
| Param | Type | Description |
|---|---|---|
| onMethod | string |
定时到时设备“开”执行的 RPC 指令命令字字符串 |
| onParam | string |
定时到时设备“开”执行的 RPC 指令参数字符串(目前仅支持单参数) |
| offMethod | string |
定时到时设备“关”执行的 RPC 指令命令字字符串 |
| offParam | string |
定时到时设备“关”执行的 RPC 指令参数字符串(目前仅支持单参数) |
miot/host/ui.openTimerSettingPageWithCustomIdentifier(customTimerIdentifier, onMethod, onParam, offMethod, offParam)
这个api 应该可以废弃了
Kind: static method of miot/host/ui
| Param | Type | Description |
|---|---|---|
| customTimerIdentifier | string |
自定义定时Identifier |
| onMethod | string |
定时到时设备“开”执行的 RPC 指令命令字字符串 |
| onParam | string |
定时到时设备“开”执行的 RPC 指令参数字符串(目前仅支持单参数) |
| offMethod | string |
定时到时设备“关”执行的 RPC 指令命令字字符串 |
| offParam | string |
定时到时设备“关”执行的 RPC 指令参数字符串(目前仅支持单参数) |
Kind: static method of miot/host/ui
| Param | Type | Description |
|---|---|---|
| onMethod | string |
定时到时设备“开”执行的 RPC 指令命令字字符串 |
| onParam | json |
定时到时设备“开”执行的 RPC 指令参数,可以是字符串、数字、字典、数组 |
| offMethod | string |
定时到时设备“关”执行的 RPC 指令命令字字符串 |
| offParam | json |
定时到时设备“关”执行的 RPC 指令参数,可以是字符串、数字、字典、数组 |
打开某设备列表中的某个设备
Kind: static method of miot/host/ui
Returns: Promise.<json> - 返回被打开的 device 信息
| Param | Type | Description |
|---|---|---|
| did | string |
设备的did |
| model | string |
设备的model |
打开一个原生类 className ,界面类类名 注意 用此方法打开的vc初始化时不需要传参数, 需要传参的viewController暂时还需要手动导出
Kind: static method of miot/host/ui
| Param | Type | Description |
|---|---|---|
| className | string |
类的名字 |
ios特有页面,android 不能使用 打开更多设置页面(通常包括安全设置,常见问题与用户反馈)
Kind: static method of miot/host/ui
Kind: inner typedef of miot/host/ui
| Param | Type |
|---|---|
| success | boolean |
| devices | Object |