# UTSAndroid

app-android平台专有内置对象。在uni-app和uni-app x的uts环境中均可使用。

## 静态方法


### onAppConfigChange

<!-- UTSJSON.UTSAndroid.onAppConfigChange.description -->

<!-- UTSJSON.UTSAndroid.onAppConfigChange.param -->

<!-- UTSJSON.UTSAndroid.onAppConfigChange.returnValue -->

<!-- UTSJSON.UTSAndroid.onAppConfigChange.compatibility -->



### offAppConfigChange

<!-- UTSJSON.UTSAndroid.offAppConfigChange.description -->

<!-- UTSJSON.UTSAndroid.offAppConfigChange.param -->

<!-- UTSJSON.UTSAndroid.offAppConfigChange.returnValue -->

<!-- UTSJSON.UTSAndroid.offAppConfigChange.compatibility -->


### onAppTrimMemory

<!-- UTSJSON.UTSAndroid.onAppTrimMemory.description -->

<!-- UTSJSON.UTSAndroid.onAppTrimMemory.param -->

<!-- UTSJSON.UTSAndroid.onAppTrimMemory.returnValue -->

<!-- UTSJSON.UTSAndroid.onAppTrimMemory.compatibility -->



### offAppTrimMemory

<!-- UTSJSON.UTSAndroid.offAppTrimMemory.description -->

<!-- UTSJSON.UTSAndroid.offAppTrimMemory.param -->

<!-- UTSJSON.UTSAndroid.offAppTrimMemory.returnValue -->

<!-- UTSJSON.UTSAndroid.offAppTrimMemory.compatibility -->



### onAppActivityPause

<!-- UTSJSON.UTSAndroid.onAppActivityPause.description -->

<!-- UTSJSON.UTSAndroid.onAppActivityPause.param -->

<!-- UTSJSON.UTSAndroid.onAppActivityPause.returnValue -->

<!-- UTSJSON.UTSAndroid.onAppActivityPause.compatibility -->



### offAppActivityPause

<!-- UTSJSON.UTSAndroid.offAppActivityPause.description -->

<!-- UTSJSON.UTSAndroid.offAppActivityPause.param -->

<!-- UTSJSON.UTSAndroid.offAppActivityPause.returnValue -->

<!-- UTSJSON.UTSAndroid.offAppActivityPause.compatibility -->



### onAppActivityResume

<!-- UTSJSON.UTSAndroid.onAppActivityResume.description -->

<!-- UTSJSON.UTSAndroid.onAppActivityResume.param -->

<!-- UTSJSON.UTSAndroid.onAppActivityResume.returnValue -->

<!-- UTSJSON.UTSAndroid.onAppActivityResume.compatibility -->


### offAppActivityResume

<!-- UTSJSON.UTSAndroid.offAppActivityResume.description -->

<!-- UTSJSON.UTSAndroid.offAppActivityResume.param -->

<!-- UTSJSON.UTSAndroid.offAppActivityResume.returnValue -->

<!-- UTSJSON.UTSAndroid.offAppActivityResume.compatibility -->



### onAppActivityDestroy

<!-- UTSJSON.UTSAndroid.onAppActivityDestroy.description -->

<!-- UTSJSON.UTSAndroid.onAppActivityDestroy.param -->

<!-- UTSJSON.UTSAndroid.onAppActivityDestroy.returnValue -->

<!-- UTSJSON.UTSAndroid.onAppActivityDestroy.compatibility -->



### offAppActivityDestroy

<!-- UTSJSON.UTSAndroid.offAppActivityDestroy.description -->

<!-- UTSJSON.UTSAndroid.offAppActivityDestroy.param -->

<!-- UTSJSON.UTSAndroid.offAppActivityDestroy.returnValue -->

<!-- UTSJSON.UTSAndroid.offAppActivityDestroy.compatibility -->



### onAppActivityResult

<!-- UTSJSON.UTSAndroid.onAppActivityResult.description -->

<!-- UTSJSON.UTSAndroid.onAppActivityResult.param -->

<!-- UTSJSON.UTSAndroid.onAppActivityResult.returnValue -->

<!-- UTSJSON.UTSAndroid.onAppActivityResult.compatibility -->




### offAppActivityResult

<!-- UTSJSON.UTSAndroid.offAppActivityResult.description -->

<!-- UTSJSON.UTSAndroid.offAppActivityResult.param -->

<!-- UTSJSON.UTSAndroid.offAppActivityResult.returnValue -->

<!-- UTSJSON.UTSAndroid.offAppActivityResult.compatibility -->



### onAppActivityBack

<!-- UTSJSON.UTSAndroid.onAppActivityBack.description -->

<!-- UTSJSON.UTSAndroid.onAppActivityBack.param -->

<!-- UTSJSON.UTSAndroid.onAppActivityBack.returnValue -->

<!-- UTSJSON.UTSAndroid.onAppActivityBack.compatibility -->



### offAppActivityBack

<!-- UTSJSON.UTSAndroid.offAppActivityBack.description -->

<!-- UTSJSON.UTSAndroid.offAppActivityBack.param -->

<!-- UTSJSON.UTSAndroid.offAppActivityBack.returnValue -->

<!-- UTSJSON.UTSAndroid.offAppActivityBack.compatibility -->



### getAppContext()

<!-- UTSJSON.UTSAndroid.getAppContext.description -->

<!-- UTSJSON.UTSAndroid.getAppContext.param -->

<!-- UTSJSON.UTSAndroid.getAppContext.returnValue -->

<!-- UTSJSON.UTSAndroid.getAppContext.compatibility -->

```uts
let packageName = UTSAndroid.getAppContext()?.packageName
console.log("packageName",packageName)
```

### getUniActivity()

<!-- UTSJSON.UTSAndroid.getUniActivity.description -->

<!-- UTSJSON.UTSAndroid.getUniActivity.param -->

<!-- UTSJSON.UTSAndroid.getUniActivity.returnValue -->

<!-- UTSJSON.UTSAndroid.getUniActivity.compatibility -->

```uts
// 获取第一个可以响应图像采集行为组件
let takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (takePictureIntent.resolveActivity(UTSAndroid.getUniActivity()!.getPackageManager()) != null) {
	UTSAndroid.getUniActivity()!.startActivityForResult(takePictureIntent, 1001);
}
```

### getResourcePath(resourceName:string)

<!-- UTSJSON.UTSAndroid.getResourcePath.description -->

<!-- UTSJSON.UTSAndroid.getResourcePath.param -->

<!-- UTSJSON.UTSAndroid.getResourcePath.returnValue -->

<!-- UTSJSON.UTSAndroid.getResourcePath.compatibility -->

::: warning 注意事项

`getResourcePath` 与 [convert2AbsFullPath](https://doc.dcloud.net.cn/uni-app-x/uts/utsandroid.html#convert2absfullpath-path-string) 区别在于：

`getResourcePath` 屏蔽了读取`代码包文件`时 各平台/各模式下的底层细节，即使是存放在`asset`目录也会返回符合android 读取规范的协议地址

`convert2AbsFullPath` 没有实现这一点

当开发者需要读取`代码包文件`时，建议使用 `getResourcePath`


- [代码包文件](../api/file-system-spec.md#package)
  - `代码包文件`在`真机运行`和`云打包`模式下的释放策略不同：\
  	本地真机运行：会被存在放内置储存目录\
  	云打包： `uni-app x`项目会被存放在`asset`目录, `uni-app` 项目默认会被存放在内置储存目录\
  	因此 `uni-app`/`uni-app x` 平台对 `代码包文件` 均仅支持读取操作
- [本地磁盘文件](../api/file-system-spec.md#disk)
	- [沙盒文件](../api/file-system-spec.md#internalsandbox)
		- 不支持
	- [沙盒外文件](../api/file-system-spec.md#%E6%B2%99%E7%9B%92%E5%A4%96%E7%9B%AE%E5%BD%95)
		- 不支持
:::


```ts
// 代码包文件
console.log(UTSAndroid.getResourcePath('static/logo.png'))
// 沙盒文件
console.log(UTSAndroid.getResourcePath('unifile://sandbox/static/logo.png'))
// 沙盒外文件
console.log(UTSAndroid.getResourcePath('/storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/static/logo.png'))
```




### exit()

<!-- UTSJSON.UTSAndroid.exit.description -->

<!-- UTSJSON.UTSAndroid.exit.param -->

<!-- UTSJSON.UTSAndroid.exit.returnValue -->

<!-- UTSJSON.UTSAndroid.exit.compatibility -->

```ts
// 退出当前应用
UTSAndroid.exit()
```

### getDispatcher

<!-- UTSJSON.UTSAndroid.getDispatcher.description -->

<!-- UTSJSON.UTSAndroid.getDispatcher.param -->

<!-- UTSJSON.UTSAndroid.getDispatcher.returnValue -->

<!-- UTSJSON.UTSAndroid.getDispatcher.compatibility -->


```uts
// 不传任何参数，得到是当前代码运行线程
let currentDispatcher = UTSAndroid.getDispatcher()
console.log("currentDispatcher",currentDispatcher)
// 期望在 io 任务队列执行
UTSAndroid.getDispatcher("io").async(function(_){
    console.log("当前任务执行在",Thread.currentThread().getName())
    // 期望在 主线程 任务队列执行
    UTSAndroid.getDispatcher("main").async(function(_){
        console.log("当前任务执行在",Thread.currentThread().getName())
        currentDispatcher.async(function(_){
            console.log("起始任务执行在",Thread.currentThread().getName())
        },null)
    },null)
},null)
```

### getAppId()

<!-- UTSJSON.UTSAndroid.getAppId.description -->

<!-- UTSJSON.UTSAndroid.getAppId.param -->

<!-- UTSJSON.UTSAndroid.getAppId.returnValue -->

<!-- UTSJSON.UTSAndroid.getAppId.compatibility -->

```uts
let appid = UTSAndroid.getAppId()
console.log("appid",appid)
```

### getOsTheme()

<!-- UTSJSON.UTSAndroid.getOsTheme.description -->

<!-- UTSJSON.UTSAndroid.getOsTheme.param -->

<!-- UTSJSON.UTSAndroid.getOsTheme.returnValue -->

<!-- UTSJSON.UTSAndroid.getOsTheme.compatibility -->

```uts
let theme = UTSAndroid.getOsTheme()
console.log("OsTheme",theme)
```

### isUniMp()

<!-- UTSJSON.UTSAndroid.isUniMp.description -->

<!-- UTSJSON.UTSAndroid.isUniMp.param -->

<!-- UTSJSON.UTSAndroid.isUniMp.returnValue -->

<!-- UTSJSON.UTSAndroid.isUniMp.compatibility -->

```uts
let isUniMp = UTSAndroid.isUniMp()
console.log("isUniMp",isUniMp)
```

### getAppName()

<!-- UTSJSON.UTSAndroid.getAppName.description -->

<!-- UTSJSON.UTSAndroid.getAppName.param -->

<!-- UTSJSON.UTSAndroid.getAppName.returnValue -->

<!-- UTSJSON.UTSAndroid.getAppName.compatibility -->

```uts
let appName = UTSAndroid.getAppName()
console.log("AppName",appName)
```

### getAppVersion()

<!-- UTSJSON.UTSAndroid.getAppVersion.description -->

<!-- UTSJSON.UTSAndroid.getAppVersion.param -->

<!-- UTSJSON.UTSAndroid.getAppVersion.returnValue -->

<!-- UTSJSON.UTSAndroid.getAppVersion.compatibility -->

```uts
let appVersion = UTSAndroid.getAppVersion()
console.log("AppVersion",appVersion)
```

### getInnerVersion()

<!-- UTSJSON.UTSAndroid.getInnerVersion.description -->

<!-- UTSJSON.UTSAndroid.getInnerVersion.param -->

<!-- UTSJSON.UTSAndroid.getInnerVersion.returnValue -->

<!-- UTSJSON.UTSAndroid.getInnerVersion.compatibility -->

```uts
let innerVersion = UTSAndroid.getInnerVersion()
console.log("InnerVersion",innerVersion)
```

### isUniAppX()

<!-- UTSJSON.UTSAndroid.isUniAppX.description -->

<!-- UTSJSON.UTSAndroid.isUniAppX.param -->

<!-- UTSJSON.UTSAndroid.isUniAppX.returnValue -->

<!-- UTSJSON.UTSAndroid.isUniAppX.compatibility -->

```uts
let isUniAppX = UTSAndroid.isUniAppX()
console.log("isUniAppX",isUniAppX)
```

### getAppCachePath()

<!-- UTSJSON.UTSAndroid.getAppCachePath.description -->

<!-- UTSJSON.UTSAndroid.getAppCachePath.param -->

<!-- UTSJSON.UTSAndroid.getAppCachePath.returnValue -->

<!-- UTSJSON.UTSAndroid.getAppCachePath.compatibility -->



```uts
let appCachePath = UTSAndroid.getAppCachePath()
console.log("AppCachePath",appCachePath)
```


### rpx2px(rpx:number) : number;

<!-- UTSJSON.UTSAndroid.rpx2px.description -->

<!-- UTSJSON.UTSAndroid.rpx2px.param -->

<!-- UTSJSON.UTSAndroid.rpx2px.returnValue -->

<!-- UTSJSON.UTSAndroid.rpx2px.compatibility -->

推荐使用uni.rpx2px来替代本API，[详见](https://doc.dcloud.net.cn/uni-app-x/api/rpx2px.html)

### devicePX2px(devicePX:number) : number;

<!-- UTSJSON.UTSAndroid.devicePX2px.description -->

<!-- UTSJSON.UTSAndroid.devicePX2px.param -->

<!-- UTSJSON.UTSAndroid.devicePX2px.returnValue -->

<!-- UTSJSON.UTSAndroid.devicePX2px.compatibility -->

```ts
// 对 100物理像素长度 进行转换
let pagePX = UTSAndroid.devicePX2px(100)
// 在特定设备返回值:36.3636360168457
console.log("pagePX",pagePX)
```

### isPrivacyAgree() : boolean;

<!-- UTSJSON.UTSAndroid.isPrivacyAgree.description -->

<!-- UTSJSON.UTSAndroid.isPrivacyAgree.param -->

<!-- UTSJSON.UTSAndroid.isPrivacyAgree.returnValue -->

<!-- UTSJSON.UTSAndroid.isPrivacyAgree.compatibility -->

```ts
// 手动标记用户已同意隐私协议
UTSAndroid.setPrivacyAgree(true)
// 此时为 true
console.log(UTSAndroid.isPrivacyAgree())
// 重置用户隐私协议状态
UTSAndroid.resetPrivacyAgree()
// 此时为 false
console.log(UTSAndroid.isPrivacyAgree())
```



### setPrivacyAgree(state:boolean):void;

<!-- UTSJSON.UTSAndroid.setPrivacyAgree.description -->

<!-- UTSJSON.UTSAndroid.setPrivacyAgree.param -->

<!-- UTSJSON.UTSAndroid.setPrivacyAgree.returnValue -->

<!-- UTSJSON.UTSAndroid.setPrivacyAgree.compatibility -->

```ts
// 手动标记用户已同意隐私协议
UTSAndroid.setPrivacyAgree(true)
// 此时为 true
console.log(UTSAndroid.isPrivacyAgree())
// 重置用户隐私协议状态
UTSAndroid.resetPrivacyAgree()
// 此时为 false
console.log(UTSAndroid.isPrivacyAgree())
```


### resetPrivacyAgree():void;

<!-- UTSJSON.UTSAndroid.resetPrivacyAgree.description -->

<!-- UTSJSON.UTSAndroid.resetPrivacyAgree.param -->

<!-- UTSJSON.UTSAndroid.resetPrivacyAgree.returnValue -->

<!-- UTSJSON.UTSAndroid.resetPrivacyAgree.compatibility -->

```ts
// 手动标记用户已同意隐私协议
UTSAndroid.setPrivacyAgree(true)
// 此时为 true
console.log(UTSAndroid.isPrivacyAgree())
// 重置用户隐私协议状态
UTSAndroid.resetPrivacyAgree()
// 此时为 false
console.log(UTSAndroid.isPrivacyAgree())
```

### requestSystemPermission

<!-- UTSJSON.UTSAndroid.requestSystemPermission.description -->

<!-- UTSJSON.UTSAndroid.requestSystemPermission.param -->

<!-- UTSJSON.UTSAndroid.requestSystemPermission.returnValue -->

<!-- UTSJSON.UTSAndroid.requestSystemPermission.compatibility -->

```uts

	let permissionNeed = ["android.permission.CAMERA"]
    // 请求拍照权限
	UTSAndroid.requestSystemPermission(UTSAndroid.getUniActivity()!, permissionNeed, function (allRight : boolean, _ : string[]) {
		if (allRight) {
			// 权限请求成功
		} else {
			//用户拒绝了部分权限
		}
	}, function (_ : boolean, _ : string[]) {
		//用户拒绝了部分权限
	})

```

请求权限后有三种情况:

+ 用户允许了全部权限请求，会通过 `success`回调通知调用者，并且此时`allRight`参数为 `true`

+ 用户拒绝了全部权限请求，会通过 `fail` 回调通知调用者，`doNotAskAgain` 参数标识了用户拒绝时是否选择了`不再询问`

+ 用户允许了部分请求，拒绝了部分权限请求,此时既会调用`success`也会调用`fail`。由其中的 string数组参数 标识具体被拒绝/允许的权限


### checkSystemPermissionGranted

<!-- UTSJSON.UTSAndroid.checkSystemPermissionGranted.description -->

<!-- UTSJSON.UTSAndroid.checkSystemPermissionGranted.param -->

<!-- UTSJSON.UTSAndroid.checkSystemPermissionGranted.returnValue -->

<!-- UTSJSON.UTSAndroid.checkSystemPermissionGranted.compatibility -->

```uts
let permissionCheck = ["android.permission.CAMERA"]
// 请求拍照权限
if (UTSAndroid.checkSystemPermissionGranted(UTSAndroid.getUniActivity()!, permissionCheck)) {
	console.log("当前已具备指定权限")
}else{
	console.log("当前不具备指定权限")
}
```


### gotoSystemPermissionActivity

<!-- UTSJSON.UTSAndroid.gotoSystemPermissionActivity.description -->

<!-- UTSJSON.UTSAndroid.gotoSystemPermissionActivity.param -->

<!-- UTSJSON.UTSAndroid.gotoSystemPermissionActivity.returnValue -->

<!-- UTSJSON.UTSAndroid.gotoSystemPermissionActivity.compatibility -->

```ts
// 前往系统权限设置界面
let permissionNeed = ["android.permission.READ_PHONE_STATE"]
UTSAndroid.gotoSystemPermissionActivity(UTSAndroid.getUniActivity()!,permissionNeed)
```


### getSystemPermissionDenied

<!-- UTSJSON.UTSAndroid.getSystemPermissionDenied.description -->

<!-- UTSJSON.UTSAndroid.getSystemPermissionDenied.param -->

<!-- UTSJSON.UTSAndroid.getSystemPermissionDenied.returnValue -->

<!-- UTSJSON.UTSAndroid.getSystemPermissionDenied.compatibility -->


```ts
	let permissionNeed = ["android.permission.READ_PHONE_STATE"]
	if (UTSAndroid.getSystemPermissionDenied(UTSAndroid.getUniActivity()!, permissionNeed).isEmpty()) {
    	console.log("当前已具备指定权限")
	}
```

### convert2AbsFullPath(path:string)

<!-- UTSJSON.UTSAndroid.convert2AbsFullPath.description -->

<!-- UTSJSON.UTSAndroid.convert2AbsFullPath.param -->

<!-- UTSJSON.UTSAndroid.convert2AbsFullPath.returnValue -->

<!-- UTSJSON.UTSAndroid.convert2AbsFullPath.compatibility -->


::: warning 注意事项

`convert2AbsFullPath` 与 [getResourcePath](https://doc.dcloud.net.cn/uni-app-x/uts/utsandroid.html#getresourcepath) 区别在于：

`convert2AbsFullPath` 对文件路径支持范围更大，不仅支持 `代码包文件`内置储存目录的情况，还支持相对路径，沙盒路径，沙盒外路径（包括系统API返回的文件地址） 等形式。

`getResourcePath` 不支持这些

当开发者明确需要操作文件，而非代码包资源时，建议使用 `convert2AbsFullPath`


- [代码包文件](../api/file-system-spec.md#package)
  - `代码包文件`在`真机运行`和`云打包`模式下的释放策略不同：\
  	本地真机运行：会被存在放内置储存目录\
  	云打包： `uni-app x`项目会被存放在`asset`目录, `uni-app` 项目会被存放在内置储存目录\
  	因此在 `uni-app`/`uni-app x` 平台对 `代码包文件` 均仅支持读取操作
- [本地磁盘文件](../api/file-system-spec.md#disk)
	- [沙盒文件](../api/file-system-spec.md#internalsandbox)
		- `uni-app x`支持读写
		- `uni-app`不支持
	- [沙盒外文件](../api/file-system-spec.md#%E6%B2%99%E7%9B%92%E5%A4%96%E7%9B%AE%E5%BD%95)
		- 沙盒管理范围外的其他文件。 调用系统API返回的绝对地址属于此类。`uni-app`/`uni-app x`平台 均支持读写
		
:::

```ts
// 代码包文件
console.log(UTSAndroid.convert2AbsFullPath('static/logo.png'))
// 沙盒文件
console.log(UTSAndroid.convert2AbsFullPath('unifile://sandbox/static/logo.png'))
// 沙盒外文件 包含相对路径
console.log(UTSAndroid.convert2AbsFullPath('../../../io.dcloud.HBuilder/apps/HBuilder/www/static/logo.png'))
```




### getFileProviderUri(file:File)

<!-- UTSJSON.UTSAndroid.getFileProviderUri.description -->

<!-- UTSJSON.UTSAndroid.getFileProviderUri.param -->

<!-- UTSJSON.UTSAndroid.getFileProviderUri.returnValue -->

<!-- UTSJSON.UTSAndroid.getFileProviderUri.compatibility -->

```ts
// 使用外部应用打开项目内置图片资源
let file = new File(UTSAndroid.getResourcePath("static/logo.png"))
const uri = UTSAndroid.getFileProviderUri(file)
const intent = new Intent(Intent.ACTION_VIEW, uri)
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
const context = UTSAndroid.getUniActivity()!;
context.startActivity(intent);

```



### getJavaClass(input:any)

<!-- UTSJSON.UTSAndroid.getJavaClass.description -->

<!-- UTSJSON.UTSAndroid.getJavaClass.param -->

<!-- UTSJSON.UTSAndroid.getJavaClass.returnValue -->

<!-- UTSJSON.UTSAndroid.getJavaClass.compatibility -->

```uts
export function getJavaClassTest() : boolean {
	let dispatcherClass = UTSAndroid.getJavaClass(UTSAndroid.getDispatcher())
	if("io.dcloud.uts.task.UTSTaskDispatcher" == dispatcherClass.name){
    	return true
	}
  	let applicationClass = UTSAndroid.getJavaClass(UTSAndroid.getAppContext()!)
  	if("io.dcloud.uniapp.UniApplication" == applicationClass.name){
    	return true
  	}
	return false
}
```

### getTopPageActivity()

<!-- UTSJSON.UTSAndroid.getTopPageActivity.description -->

<!-- UTSJSON.UTSAndroid.getTopPageActivity.param -->

<!-- UTSJSON.UTSAndroid.getTopPageActivity.returnValue -->

<!-- UTSJSON.UTSAndroid.getTopPageActivity.compatibility -->

```ts
// 获取当前栈顶activity
console.log(UTSAndroid.getTopPageActivity())
```

### onActivityCallback(callback, pageRoute?)

<!-- UTSJSON.UTSAndroid.onActivityCallback.description -->

<!-- UTSJSON.UTSAndroid.onActivityCallback.param -->

<!-- UTSJSON.UTSAndroid.onActivityCallback.returnValue -->

<!-- UTSJSON.UTSAndroid.onActivityCallback.compatibility -->

### offActivityCallback(callback)

<!-- UTSJSON.UTSAndroid.offActivityCallback.description -->

<!-- UTSJSON.UTSAndroid.offActivityCallback.param -->

<!-- UTSJSON.UTSAndroid.offActivityCallback.returnValue -->

<!-- UTSJSON.UTSAndroid.offActivityCallback.compatibility -->

### onPrivacyAgreeChange(callback)

<!-- UTSJSON.UTSAndroid.onPrivacyAgreeChange.description -->

<!-- UTSJSON.UTSAndroid.onPrivacyAgreeChange.param -->

<!-- UTSJSON.UTSAndroid.onPrivacyAgreeChange.returnValue -->

<!-- UTSJSON.UTSAndroid.onPrivacyAgreeChange.compatibility -->

### offPrivacyAgreeChange(callback)

<!-- UTSJSON.UTSAndroid.offPrivacyAgreeChange.description -->

<!-- UTSJSON.UTSAndroid.offPrivacyAgreeChange.param -->

<!-- UTSJSON.UTSAndroid.offPrivacyAgreeChange.returnValue -->

<!-- UTSJSON.UTSAndroid.offPrivacyAgreeChange.compatibility -->


### setAppTheme(theme)

<!-- UTSJSON.UTSAndroid.setAppTheme.description -->

<!-- UTSJSON.UTSAndroid.setAppTheme.param -->

<!-- UTSJSON.UTSAndroid.setAppTheme.returnValue -->

<!-- UTSJSON.UTSAndroid.setAppTheme.compatibility -->

### onAppThemeChanged(callback)

<!-- UTSJSON.UTSAndroid.onAppThemeChanged.description -->

<!-- UTSJSON.UTSAndroid.onAppThemeChanged.param -->

<!-- UTSJSON.UTSAndroid.onAppThemeChanged.returnValue -->

<!-- UTSJSON.UTSAndroid.onAppThemeChanged.compatibility -->

### offAppThemeChanged(callbackId)

<!-- UTSJSON.UTSAndroid.offAppThemeChanged.description -->

<!-- UTSJSON.UTSAndroid.offAppThemeChanged.param -->

<!-- UTSJSON.UTSAndroid.offAppThemeChanged.returnValue -->

<!-- UTSJSON.UTSAndroid.offAppThemeChanged.compatibility -->

### onOsThemeChanged(callback)

<!-- UTSJSON.UTSAndroid.onOsThemeChanged.description -->

<!-- UTSJSON.UTSAndroid.onOsThemeChanged.param -->

<!-- UTSJSON.UTSAndroid.onOsThemeChanged.returnValue -->

<!-- UTSJSON.UTSAndroid.onOsThemeChanged.compatibility -->

### offOsThemeChanged(callbackId)

<!-- UTSJSON.UTSAndroid.offOsThemeChanged.description -->

<!-- UTSJSON.UTSAndroid.offOsThemeChanged.param -->

<!-- UTSJSON.UTSAndroid.offOsThemeChanged.returnValue -->

<!-- UTSJSON.UTSAndroid.offOsThemeChanged.compatibility -->

<!-- UTSJSON.UTSAndroid.tutorial -->

