當前位置: 首頁>>代碼示例>>Java>>正文


Java EasyPermissions.somePermissionPermanentlyDenied方法代碼示例

本文整理匯總了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();
}
 
開發者ID:Arjun-sna,項目名稱:android-permission-checker-app,代碼行數:8,代碼來源:AppDetailsFragment.java

示例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();
    }
}
 
開發者ID:CodingCodersCode,項目名稱:EvolvingNetLib,代碼行數:11,代碼來源:DownloadListTestActivity.java

示例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);
    }

}
 
開發者ID:googlecodelabs,項目名稱:android-storage-permissions,代碼行數:16,代碼來源:ImagesFragment.java

示例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();
    }
}
 
開發者ID:RockyQu,項目名稱:MVVMFrames,代碼行數:11,代碼來源:WelcomeActivity.java

示例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();
            }
    }
}
 
開發者ID:CityZenApp,項目名稱:Android-Development,代碼行數:28,代碼來源:MainActivity.java

示例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();
    }
}
 
開發者ID:android-jian,項目名稱:topnews,代碼行數:14,代碼來源:SettingFragment.java

示例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();
    }
}
 
開發者ID:FZZFVII,項目名稱:pipe,代碼行數:11,代碼來源:PermisionsFragment.java

示例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();
    }
}
 
開發者ID:typebrook,項目名稱:FiveMinsMore,代碼行數:11,代碼來源:BaseActivity.java

示例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();
    }
}
 
開發者ID:hsj-xiaokang,項目名稱:OSchina_resources_android,代碼行數:8,代碼來源:LargeImageActivity.java

示例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();
}
 
開發者ID:Arjun-sna,項目名稱:Android-AudioRecorder-App,代碼行數:8,代碼來源:MainActivity.java

示例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();
	}
}
 
開發者ID:EduardoVernier,項目名稱:bikedeboa-android,代碼行數:14,代碼來源:MapActivity.java

示例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();
    }
}
 
開發者ID:RuanXiaoHui,項目名稱:ZxingScan,代碼行數:14,代碼來源:MainActivity.java

示例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);
    }

}
 
開發者ID:googlecodelabs,項目名稱:android-storage-permissions,代碼行數:16,代碼來源:ImageImportActivity.java

示例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();
    }
}
 
開發者ID:CodingCodersCode,項目名稱:EvolvingNetLib,代碼行數:7,代碼來源:UploadRequestActivity.java

示例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();
    }
}
 
開發者ID:alphater,項目名稱:garras,代碼行數:7,代碼來源:PhotoFragment.java


注:本文中的pub.devrel.easypermissions.EasyPermissions.somePermissionPermanentlyDenied方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。