【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); } } }
推荐阅读
- Android Studio第二十五期 - 自定义键盘+支付输入框
- android 指示器tablatyout
- PHP Gmagick borderImage()函数用法示例
- OOP编程(Scala中的继承详细指南)
- Python MongoDB查询用法示例详细介绍
- Kruskal的最小生成树算法|贪婪算法2
- PHP中的超全局变量解析和用法示例
- JavaScript Math random()方法用法示例
- Perl变量用法完整指南和示例