This sample shows runtime permissions available in Android M and above. Display the log on screen to follow the execution. If executed on an Android M device, an additional option to access contacts is shown that is declared with optional, M and above only permissions.
此示例显示了在Android M及以上版本可用的运行权限。在屏幕上显示日志查看执行状态。如果在Android M设备上执行, 访问联系人会被弹出额外的选项来提示使用这个权限,仅在android M及以上版本会有这些权限。
代码下载:http://pan.baidu.com/s/1hqvxQra