10 手机权限模块 - MiEcosystem/miot-plugin-sdk GitHub Wiki
手机的语音、相机和定位的权限
Export: public
Doc_name: 手机权限模块
Doc_index: 10
Doc_directory: system
Example
import {System} from "miot"
...
System.permission.request(permission).then((res) => {})
...
-
miot/system
- static
-
inner
-
~PermissionInfo :
Object
-
~PermissionRes :
Object
-
~PermissionInfo :
权限
Kind: static interface of miot/system
Kind: inner typedef of miot/system
Properties
Name | Type | Description |
---|---|---|
type | number |
iOS 中,为 PHOTOS 时, 0表示未选择, 1,2表示无权限,3表示有权限,4表示部分照片有权限 |
Kind: inner typedef of miot/system
Properties
Name | Type | Description |
---|---|---|
code | number |
0表示成功,其他表示失败 |
message | string |
信息描述 |
info | [ 'Object' ].<PermissionInfo> |
可选 |