当前位置: 首页>>代码示例>>Java>>正文


Java OnPermissionDenied类代码示例

本文整理汇总了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();
}
 
开发者ID:LingjuAI,项目名称:AssistantBySDK,代码行数:19,代码来源:StartUpActivity.java

示例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();
}
 
开发者ID:Twelvelines,项目名称:AndroidMuseumBleManager,代码行数:12,代码来源:MainActivity.java

示例3: showDenied

import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied(Manifest.permission.WRITE_EXTERNAL_STORAGE)
    //用户选择拒绝的提示
void showDenied()
{
    MyToast.showTextToast(getApplicationContext(),"拒绝将无法下载最新APK");
    mView.startAnim();
}
 
开发者ID:dufangyu1990,项目名称:LeCatApp,代码行数:8,代码来源:SplashActivity.java

示例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();
}
 
开发者ID:BANKEX,项目名称:smart-asset-iot-android-demo,代码行数:6,代码来源:MainActivity.java

示例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);
    }
}
 
开发者ID:videgro,项目名称:Ships,代码行数:7,代码来源:ShowMapFragment.java

示例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);
    }
}
 
开发者ID:videgro,项目名称:Ships,代码行数:7,代码来源:ShowMapFragment.java

示例7: showDenied

import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied(Manifest.permission.CALL_PHONE)
//用户选择拒绝时的提示
    void showDenied() {
        Toast.makeText(this, "用户选择拒绝时的提示", Toast.LENGTH_SHORT).show();
    }
 
开发者ID:henrymorgen,项目名称:android-advanced-light,代码行数:6,代码来源:ThirdPartyActivity.java

示例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();
}
 
开发者ID:rumaan,项目名称:file.io-app,代码行数:5,代码来源:MainActivity.java

示例9: onCameraDenied

import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied(Manifest.permission.CAMERA)
void onCameraDenied() {
    Toast.makeText(getContext(), "不允许拍照", Toast.LENGTH_LONG).show();
}
 
开发者ID:remerber,项目名称:FastEc,代码行数:5,代码来源:PermissionCheckerDelegate.java

示例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);
}
 
开发者ID:vshkl,项目名称:SaveIg,代码行数:6,代码来源:MainActivity.java

示例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();
}
 
开发者ID:TryGhost,项目名称:Ghost-Android,代码行数:6,代码来源:PostEditFragment.java

示例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();
}
 
开发者ID:liuguoquan727,项目名称:android-study,代码行数:7,代码来源:WelcomeActivity.java

示例13: showDeniedForMediaSelect

import permissions.dispatcher.OnPermissionDenied; //导入依赖的package包/类
@OnPermissionDenied({ Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE })
void showDeniedForMediaSelect() {
}
 
开发者ID:liuguoquan727,项目名称:android-study,代码行数:4,代码来源:PermissionFragment.java

示例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));
}
 
开发者ID:organizationAllink,项目名称:wzyx-android-user,代码行数:8,代码来源:SplashActivity.java

示例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));
}
 
开发者ID:organizationAllink,项目名称:wzyx-android-user,代码行数:8,代码来源:AccountSettingActivity.java


注:本文中的permissions.dispatcher.OnPermissionDenied类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。