本文整理匯總了Java中pub.devrel.easypermissions.EasyPermissions.somePermissionPermanentlyDenied方法的典型用法代碼示例。如果您正苦於以下問題:Java EasyPermissions.somePermissionPermanentlyDenied方法的具體用法?Java EasyPermissions.somePermissionPermanentlyDenied怎麽用?Java EasyPermissions.somePermissionPermanentlyDenied使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pub.devrel.easypermissions.EasyPermissions
的用法示例。
在下文中一共展示了EasyPermissions.somePermissionPermanentlyDenied方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override public void onPermissionsDenied(int requestCode, List<String> perms) {
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
showRationale();
return;
}
appDetailsPresenter.onPermissionDenied();
}
示例2: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onPermissionsDenied(int requestCode, List<String> perms) {
//Log.d(TAG, "onPermissionsDenied:" + requestCode + ":" + perms.size());
// (Optional) Check whether the user denied any permissions and checked "NEVER ASK AGAIN."
// This will display a dialog directing them to enable the permission in app settings.
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
new AppSettingsDialog.Builder(this).build().show();
}
}
示例3: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onPermissionsDenied(int requestCode, List<String> list) {
if (requestCode != REQUEST_STORAGE_PERMISSION) {
return;
}
if (EasyPermissions.somePermissionPermanentlyDenied(this, list)) {
// Permanently denied. Notify presenter.
Log.d(TAG, "Permission has been permanently denied.");
new AppSettingsDialog.Builder(this).build().show();
} else {
mPresenter.onPermissionRequestResult(false);
}
}
示例4: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onPermissionsDenied(int requestCode, List<String> perms) {
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
new AppSettingsDialog.Builder(this)
.setTitle(R.string.PermissionsErrorTitle)
.setRationale(R.string.PermissionsErrorMessage)
.build()
.show();
}
}
示例5: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onPermissionsDenied(int requestCode, List<String> perms) {
if (requestCode == WRITE_EXTERNAL_STORAGE_PERMISSION) {
new AppToast(this).longToast(R.string.write_storage_request_toast);
//double check that write access is granted, this permission is needed
requestWriteExternalStoragePermission();
// (Optional) Check whether the user denied any permissions and checked "NEVER ASK AGAIN."
// This will display a dialog directing them to enable the permission in app settings.
if (!EasyPermissions.hasPermissions(this, Manifest.permission.WRITE_EXTERNAL_STORAGE))
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
new AppSettingsDialog.Builder(this).build().show();
}
} else if (requestCode == LOCATION_PERMISSION) {
new AppToast(this).longToast(R.string.location_request_toast);
//double check that write access is granted, this permission is needed
requestLocationPermission();
String[] permissions = {Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION};
// (Optional) Check whether the user denied any permissions and checked "NEVER ASK AGAIN."
// This will display a dialog directing them to enable the permission in app settings.
if (!EasyPermissions.hasPermissions(this, permissions))
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
new AppSettingsDialog.Builder(this).build().show();
}
}
}
示例6: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onPermissionsDenied(int requestCode, List<String> perms) {
Toast.makeText(UIUtils.getContext(), "執行onPermissionsDenied()...", Toast.LENGTH_SHORT).show();
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
new AppSettingsDialog.Builder(this, "當前App需要申請camera權限,需要打開設置頁麵麽?")
.setTitle("權限申請")
.setPositiveButton("確認")
.setNegativeButton("取消", null /* click listener */)
.setRequestCode(REQUEST_CAMERA_PERM)
.build()
.show();
}
}
示例7: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onPermissionsDenied(int requestCode, List<String> perms) {
// 如果權限有沒有申請成功的權限存在,則彈出彈出框,用戶點擊後去到設置界麵自己打開權限
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
new AppSettingsDialog
.Builder(this)
.build()
.show();
}
}
示例8: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onPermissionsDenied(int requestCode, List<String> perms) {
Log.d(TAG, "onPermissionsDenied:" + requestCode + ":" + perms.size());
// If Permission permanently denied, ask user again
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
new AppSettingsDialog.Builder(this).build().show();
} else {
finish();
}
}
示例9: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onPermissionsDenied(int requestCode, List<String> perms) {
Toast.makeText(this, R.string.gallery_save_file_not_have_external_storage_permission, Toast.LENGTH_SHORT).show();
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
new AppSettingsDialog.Builder(this).build().show();
}
}
示例10: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override public void onPermissionsDenied(int requestCode, List<String> perms) {
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
showRationale();
return;
}
finish();
}
示例11: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onPermissionsDenied(int requestCode, List<String> permissions) {
if (EasyPermissions.somePermissionPermanentlyDenied(this, permissions)) {
new AppSettingsDialog.Builder(this)
.setRationale(R.string.rationale)
.setTitle(R.string.title_rationale)
.setPositiveButton(R.string.app_settings)
.setNegativeButton(R.string.cancel)
.setRequestCode(SETTINGS_REQUEST_CODE)
.build()
.show();
}
}
示例12: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onPermissionsDenied(int requestCode, List<String> perms) {
Toast.makeText(this, "執行onPermissionsDenied()...", Toast.LENGTH_SHORT).show();
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
new AppSettingsDialog.Builder(this, "當前App需要申請camera權限,需要打開設置頁麵麽?")
.setTitle("權限申請")
.setPositiveButton("確認")
.setNegativeButton("取消", null /* click listener */)
.setRequestCode(REQUEST_CAMERA_PERM)
.build()
.show();
}
}
示例13: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onPermissionsDenied(int requestCode, List<String> list) {
if (requestCode != REQUEST_STORAGE_PERMISSION || !list.contains(READ_EXTERNAL_STORAGE)) {
return;
}
if (EasyPermissions.somePermissionPermanentlyDenied(this, list)) {
// Permanently denied. Notify presenter.
Log.d(TAG, "Permission has been permanently denied.");
new AppSettingsDialog.Builder(this).build().show();
} else {
showPermissionError(true);
}
}
示例14: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onPermissionsDenied(int requestCode, List<String> perms) {
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
new AppSettingsDialog.Builder(this).build().show();
}
}
示例15: onPermissionsDenied
import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onPermissionsDenied(int requestCode, @NonNull List<String> perms) {
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
new AppSettingsDialog.Builder(this).build().show();
}
}