权限管理

更新时间:

权限列表说明:

权限名 需要导入的模块 需要权限申请的具体接口 说明 权限错误码
watch.permission.LOCATION import geolocation from '@blueos.hardware.geolocation' geolocation.getLocation(OBJECT)
geolocation.subscribe(OBJECT)
geolocation.unsubscribe()
位置信息 400 : 拒绝授予权限, 402: 权限错误(未声明该权限)
watch.permission.STEP_COUNTER import sensor from '@blueos.hardware.sensor' sensor.subscribeStepCounter(OBJECT) 计步传感器 400 : 拒绝授予权限, 402: 权限错误(未声明该权限)
watch.permission.DEVICE_INFO import device from '@blueos.hardware.device' device.getId(OBJECT)
device.getDeviceId(OBJECT)
device.getSerial(OBJECT)
设备信息 400: 拒绝授予权限 , 402: 权限错误(未声明该权限)
watch.permission.RECORD import record from '@blueos.multimedia.record' record.start(OBJECT)
record.stop(OBJECT)
record.release(OBJECT)
录音 400: 拒绝授予权限, 401: 敏感权限不能在后台运行, 402: 权限错误(未声明该权限)
watch.permission.BLUETOOTH import bluetooth from '@blueos.communication.bluetooth.bluetooth'
import bluetooth from '@vivo.bluetooth'
bluetooth.getBindState()
bluetooth.startBind(OBJECT)
bluetooth.confirmBind(OBJECT)
bluetooth.cancelBind(OBJECT)
bluetooth.startDevicesDiscovery(OBJECT)
bluetooth.ondevicefound = function(data)
bluetooth.stopDevicesDiscovery(OBJECT)
bluetooth.getConnectedDevices(OBJECT)
bluetooth.getPairedDevices(OBJECT)
bluetooth.createConnection(OBJECT)
bluetooth.closeConnection (OBJECT)
bluetooth.pair(OBJECT)
bluetooth.unpair(OBJECT)
bluetooth.subscribeBind(OBJECT)
bluetooth.clearBindData(OBJECT)
bluetooth.replyPhone(OBJECT)
bluetooth.onadapterstatechange = function(data)
允许使用设备蓝牙 400 : 拒绝授予权限, 402: 权限错误(未声明该权限)
watch.permission.READ_HEALTH_DATA import health from '@blueos.health.health'
import health from '@vivo.health'
health.getRecentSamples(Object)
health.subscribeSample(Object)
health.unsubscribeSample(Object)
health.getTodayStatistic(Object)
health.subscribeTodayStatistic(Object)
health.unsubscribeTodayStatistic(Object)
读取健康数据 400 : 拒绝授予权限, 402: 权限错误(未声明该权限)
上一篇
概述
下一篇
密码算法
以上内容对您是否有帮助?
  • 毫无帮助
  • 帮助不大
  • 一般
  • 很好
  • 非常好
意见反馈