本文整理汇总了Java中permissions.dispatcher.OnPermissionDenied类的典型用法代码示例。如果您正苦于以下问题:Java OnPermissionDenied类的具体用法?Java OnPermissionDenied怎么用?Java OnPermissionDenied使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OnPermissionDenied类属于permissions.dispatcher包,在下文中一共展示了OnPermissionDenied类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showRecordDenied
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
/**
* 申请权限被拒后调用
**/
@OnPermissionDenied({Manifest.permission.CALL_PHONE, //拨号
Manifest.permission.PROCESS_OUTGOING_CALLS,
Manifest.permission.RECORD_AUDIO, //录音
Manifest.permission.ACCESS_COARSE_LOCATION, //定位
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.READ_CONTACTS, //读取联系人
Manifest.permission.READ_CALL_LOG, //读取通话记录
Manifest.permission.READ_SMS, //读取短信
Manifest.permission.SEND_SMS, //发送短信
"android.permission.WRITE_SMS", //写短信
Manifest.permission.BLUETOOTH, //蓝牙
Manifest.permission.BLUETOOTH_ADMIN})
public void showRecordDenied() {
Toast.makeText(StartUpActivity.this, "有权限被拒绝将影响程序正常运行, 请自行到应用权限管理页面设置!", Toast.LENGTH_LONG).show();
}
示例2: onPermissionStateDenied
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
/**
* 提示窗口和权限同意窗口--被拒绝时调用
*/
@OnPermissionDenied({Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH,
Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE})
void onPermissionStateDenied() {
// NOTE: Deal with a denied permission, e.g. by showing specific UI
// or disabling certain functionality
Toast.makeText(this, R.string.permission_denied, Toast.LENGTH_SHORT).show();
}
示例3: showDenied
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied(Manifest.permission.WRITE_EXTERNAL_STORAGE)
//用户选择拒绝的提示
void showDenied()
{
MyToast.showTextToast(getApplicationContext(),"拒绝将无法下载最新APK");
mView.startAnim();
}
示例4: showLocationPermissionDenied
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied({Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION})
void showLocationPermissionDenied() {
Snackbar.make(buttonContainer, R.string.location_permission_not_granted_message,
Snackbar.LENGTH_LONG).show();
}
示例5: showDeniedForExternalStorage
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied(Manifest.permission.WRITE_EXTERNAL_STORAGE)
void showDeniedForExternalStorage() {
if (isAdded()) {
Utils.showPopup(IMAGE_POPUP_ID_IGNORE, getActivity(), this, getString(R.string.permission_externalstorage_denied_title), getString(R.string.permission_externalstorage_denied), R.drawable.thumbs_down_circle, null);
}
}
示例6: showDeniedForLocation
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied(Manifest.permission.ACCESS_FINE_LOCATION)
void showDeniedForLocation() {
if (isAdded()) {
Utils.showPopup(IMAGE_POPUP_ID_IGNORE, getActivity(), this, getString(R.string.permission_location_denied_title), getString(R.string.permission_location_denied), R.drawable.thumbs_down_circle, null);
}
}
示例7: showDenied
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied(Manifest.permission.CALL_PHONE)
//用户选择拒绝时的提示
void showDenied() {
Toast.makeText(this, "用户选择拒绝时的提示", Toast.LENGTH_SHORT).show();
}
示例8: showPermissionDeniedForStorage
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied({Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE})
void showPermissionDeniedForStorage() {
Toast.makeText(this, getString(R.string.permission_deny), Toast.LENGTH_SHORT).show();
}
示例9: onCameraDenied
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied(Manifest.permission.CAMERA)
void onCameraDenied() {
Toast.makeText(getContext(), "不允许拍照", Toast.LENGTH_LONG).show();
}
示例10: showDeniedForWriteExternalStorage
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied(Manifest.permission.WRITE_EXTERNAL_STORAGE)
public void showDeniedForWriteExternalStorage() {
showAlert(R.string.permission_denied_title, R.color.colorAlertOrange, R.drawable.ic_alert,
Constants.DURATION_LONG);
}
示例11: onStoragePermissionDenied
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@SuppressLint("InlinedApi") // suppressed because PermissionsDispatcher handles API levels for us
@OnPermissionDenied(Manifest.permission.READ_EXTERNAL_STORAGE)
void onStoragePermissionDenied() {
Toast.makeText(mActivity, R.string.image_upload_failed, Toast.LENGTH_SHORT).show();
}
示例12: showDeniedForPermission
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied({
Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.CAMERA,
Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_PHONE_STATE
}) void showDeniedForPermission() {
deniedPermission();
}
示例13: showDeniedForMediaSelect
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied({ Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE })
void showDeniedForMediaSelect() {
}
示例14: onLocateDenied
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
/**
* 拒绝定位权限
*/
@OnPermissionDenied(Manifest.permission.ACCESS_FINE_LOCATION)
void onLocateDenied(){
ToastUtil.toastShort(this,getResources().getString(R.string.locate_permission_denied));
}
示例15: onCameraDenied
import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
/**
* 用户拒绝相机权限时调用
*/
@OnPermissionDenied({Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE})
void onCameraDenied() {
ToastUtil.toastShort(this,getResources().getString(R.string.camera_permission_denied));
}