if (UTSAndroid.getAppTempPath()!.contains("data/io.dcloud.HBuilder/apps/HBuilder/temp")) {
return true
}
return false
}
export function typeofClickTest():boolean{
if(UTSAndroid.typeof('hello wrold') != 'string'){
/**
* UTSAndroid.typeof 测试示例
*/
export function typeofClickTest() : boolean {
if (UTSAndroid.typeof('hello wrold') != 'string') {
return false
}
if(UTSAndroid.typeof(3.1415926) != 'number'){
if (UTSAndroid.typeof(3.1415926) != 'number') {
return false
}
if(UTSAndroid.typeof(-100) != 'number'){
if (UTSAndroid.typeof(-100) != 'number') {
return false
}
if(UTSAndroid.typeof(false) != 'boolean'){
if (UTSAndroid.typeof(false) != 'boolean') {
return false
}
if(UTSAndroid.typeof(true) != 'boolean'){
if (UTSAndroid.typeof(true) != 'boolean') {
return false
}
if(UTSAndroid.typeof(new Date()) != 'object'){
if (UTSAndroid.typeof(new Date()) != 'object') {
return false
}
return true
}
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)
return true
/**
* 手动跳转用户授权管理界面
*/
export function gotoSystemPermissionActivityTest() {
}, function (_doNotAskAgain : boolean, _grantedList : string[]) {
//callback(false,"用户拒绝了部分权限")
})
return true;
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
}
export function gotoSystemPermissionActivityTest(){