定位

用户授权

 1"requestPermissions": [  2 {  3 "name": "ohos.permission.INTERNET"  4 },  5 {  6 // 用户授权,允许应用获取设备位置信息  7 'name': 'ohos.permission.LOCATION',  8 'reason': '需要获取定位权限说明',  9 'usedScene': { 10 "abilities": [ 11 'EntryAbility' 12 ], 13 'when': 'inuse' 14 } 15 }, 16 { 17 // 用户授权,允许应用获取模糊位置信息 18 'name': 'ohos.permission.APPROXIMATELY_LOCATION', 19 'reason': '需要获取定位权限说明', 20 'usedScene': { 21 "abilities": [ 22 'EntryAbility' 23 ], 24 'when': 'inuse' 25 } 26 },
"requestPermissions": [ { "name": "ohos.permission.INTERNET" }, { // 用户授权,允许应用获取设备位置信息 'name': 'ohos.permission.LOCATION', 'reason': '需要获取定位权限说明', 'usedScene': { "abilities": [ 'EntryAbility' ], 'when': 'inuse' } }, { // 用户授权,允许应用获取模糊位置信息 'name': 'ohos.permission.APPROXIMATELY_LOCATION', 'reason': '需要获取定位权限说明', 'usedScene': { "abilities": [ 'EntryAbility' ], 'when': 'inuse' } },

Powered By 可尔物语

浙ICP备11005866号-12