赞
踩
权限配置
ohos.permission.SYSTEM_FLOAT_WINDOW
config.json配置
config.json配置权限,代码如下
- "reqPermissions": [
-
- {
- "name": "ohos.permission.SYSTEM_FLOAT_WINDOW"
- }
- ],
在mianAbility进行配置,代码如下
- package com.harmony.alliance.myapplication;
-
- import ohos.ace.ability.AceAbility;
- import ohos.aafwk.content.Intent;
-
- public class MainAbility extends AceAbility {
- @Override
- public void onStart(Intent intent) {
- String[] permissions = {
- "ohos.permission.WRITE_USER_STORAGE",
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。