Android6.0权限组申请
Posted newcaoguo
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android6.0权限组申请相关的知识,希望对你有一定的参考价值。
void checkPermission() { final List<String> permissionsList = new ArrayList<>(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if ((checkSelfPermission(Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED)) permissionsList.add(Manifest.permission.READ_PHONE_STATE); if ((checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED)) permissionsList.add(Manifest.permission.WRITE_EXTERNAL_STORAGE); if (permissionsList.size() != 0) { requestPermissions(permissionsList.toArray(new String[permissionsList.size()]), REQUEST_PHONE_PERMISSIONS); } } }
以上是关于Android6.0权限组申请的主要内容,如果未能解决你的问题,请参考以下文章
Android6.0------权限申请RxPermissions