We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PermissionX.init(this) .permissions(Manifest.permission.QUERY_ALL_PACKAGES) .onExplainRequestReason((scope, deniedList) -> { scope.showRequestReasonDialog(deniedList, "我们需要访问已安装应用列表的权限来提供更好的服务。请允许该权限。", "我已明白"); }) .onForwardToSettings((scope, deniedList) -> { scope.showForwardToSettingsDialog(deniedList, "您已经拒绝了访问已安装应用列表的权限。请前往设置页面手动授予权限。", "我已明白"); }) .request(new RequestCallback() { @OverRide public void onResult(boolean allGranted, List grantedList, List deniedList) { if (allGranted) { // 所有权限都已授予 fetchInstalledApps(); } else { // 用户拒绝了某些权限 Toast.makeText(MainActivity1.this, "无法获取已安装应用列表,请检查权限设置", Toast.LENGTH_LONG).show(); } } });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
PermissionX.init(this)
.permissions(Manifest.permission.QUERY_ALL_PACKAGES)
.onExplainRequestReason((scope, deniedList) -> {
scope.showRequestReasonDialog(deniedList, "我们需要访问已安装应用列表的权限来提供更好的服务。请允许该权限。", "我已明白");
})
.onForwardToSettings((scope, deniedList) -> {
scope.showForwardToSettingsDialog(deniedList, "您已经拒绝了访问已安装应用列表的权限。请前往设置页面手动授予权限。", "我已明白");
})
.request(new RequestCallback() {
@OverRide
public void onResult(boolean allGranted, List grantedList, List deniedList) {
if (allGranted) {
// 所有权限都已授予
fetchInstalledApps();
} else {
// 用户拒绝了某些权限
Toast.makeText(MainActivity1.this, "无法获取已安装应用列表,请检查权限设置", Toast.LENGTH_LONG).show();
}
}
});
The text was updated successfully, but these errors were encountered: