export function checkSystemPermissionGrantedTest():boolean{
let ret = UTSAndroid.checkSystemPermissionGranted(UTSAndroid.getUniActivity()!,utsArrayOf('Manifest.permission.RECORD_AUDIO'))
console.log(ret)
let ret3 = UTSAndroid.checkSystemPermissionGranted(UTSAndroid.getUniActivity()!,utsArrayOf('Manifest.permission.ACCESS_WIFI_STATE','Manifest.permission.WRITE_CALENDAR','Manifest.permission.BLUETOOTH'))
console.log(ret3)
let permissionNeed = utsArrayOf("android.permission.CAMERA")
return true
}
UTSAndroid.requestSystemPermission(UTSAndroid.getUniActivity()!, permissionNeed, function (allRight : boolean, _grantedList : string[]) {
}, function (_doNotAskAgain : boolean, _grantedList : string[]) {
//callback(false,"用户拒绝了部分权限")
})
export function getSystemPermissionDeniedTest():boolean{
let ret = UTSAndroid.getSystemPermissionDenied(UTSAndroid.getUniActivity()!,utsArrayOf('Manifest.permission.RECORD_AUDIO'))
console.log(ret)
let ret3 = UTSAndroid.getSystemPermissionDenied(UTSAndroid.getUniActivity()!,utsArrayOf('Manifest.permission.ACCESS_WIFI_STATE','Manifest.permission.WRITE_CALENDAR','Manifest.permission.BLUETOOTH'))
console.log(ret3)
return true;
return true
}
export function gotoSystemPermissionActivityTest(){