Android6.0权限组申请

【Android6.0权限组申请】与天地兮比寿,与日月兮齐光。这篇文章主要讲述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); } } }

 

    推荐阅读