发布网友 发布时间:2022-04-26 05:59
共1个回答
热心网友 时间:2023-10-08 16:06
PackageManager pm = getPackageManager();
boolean flag = (PackageManager.PERMISSION_GRANTED ==
pm.checkPermission("android.permission.RECORD_AUDIO", "packageName"));
if (flag) {
//有这个权限,做相应处理
}else { //没有权限
}