仅当用户启用特定首选项时,是否可以请求特定许可?
就我而言,我可以选择与日历同步以添加日期和设置提醒(据我所知,您无法使用Intent在日历中设置提醒)。显然,我需要访问日历的权限,但是仅当用户启用此选项时才可以。我想在用户启用首选项时请求权限,然后在未授予权限的情况下禁用该选项。
最佳答案
否。不幸的是,没有选择这样做。No checks with the user are done while an application is running: it either was granted a particular permission when installed, and can use that feature as desired, or the permission was not granted and any attempt to use the feature will fail without prompting the user.
http://developer.android.com/guide/topics/security/permissions.html