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


Java PermissionFail类代码示例

本文整理汇总了Java中kr.co.namee.permissiongen.PermissionFail的典型用法代码示例。如果您正苦于以下问题:Java PermissionFail类的具体用法?Java PermissionFail怎么用?Java PermissionFail使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PermissionFail类属于kr.co.namee.permissiongen包,在下文中一共展示了PermissionFail类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: permissionFailure

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void permissionFailure(){
    Toast.makeText(this, "权限拒绝,无法正常使用", Toast.LENGTH_LONG).show();
    new Handler().postDelayed(new Runnable() {
        @Override
        public void run() {
            finish();
        }
    }, 1000);
}
 
开发者ID:jiajunhui,项目名称:PlayerBase,代码行数:11,代码来源:SplashActivity.java

示例2: findMethodPermissionFailWithRequestCode

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
public static <A extends Annotation> Method findMethodPermissionFailWithRequestCode(Class clazz,
                                                                                    Class<A> permissionFailClass, int requestCode) {
    for (Method method : clazz.getDeclaredMethods()) {
        if (method.isAnnotationPresent(permissionFailClass)) {
            if (requestCode == method.getAnnotation(PermissionFail.class).requestCode()) {
                return method;
            }
        }
    }
    return null;
}
 
开发者ID:why168,项目名称:AndroidProjects,代码行数:12,代码来源:Utils.java

示例3: isEqualRequestCodeFromAnntation

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
public static boolean isEqualRequestCodeFromAnntation(Method m, Class clazz, int requestCode) {
    if (clazz.equals(PermissionFail.class)) {
        return requestCode == m.getAnnotation(PermissionFail.class).requestCode();
    } else if (clazz.equals(PermissionSuccess.class)) {
        return requestCode == m.getAnnotation(PermissionSuccess.class).requestCode();
    } else {
        return false;
    }
}
 
开发者ID:why168,项目名称:AndroidProjects,代码行数:10,代码来源:Utils.java

示例4: findMethodPermissionFailWithRequestCode

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
public static <A extends Annotation> Method findMethodPermissionFailWithRequestCode(Class clazz,
    Class<A> permissionFailClass, int requestCode) {
  for(Method method : clazz.getDeclaredMethods()){
    if(method.isAnnotationPresent(permissionFailClass)){
      if(requestCode == method.getAnnotation(PermissionFail.class).requestCode()){
        return method;
      }
    }
  }
  return null;
}
 
开发者ID:lovedise,项目名称:PermissionGen,代码行数:12,代码来源:Utils.java

示例5: isEqualRequestCodeFromAnntation

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
public static boolean isEqualRequestCodeFromAnntation(Method m, Class clazz, int requestCode){
  if(clazz.equals(PermissionFail.class)){
    return requestCode == m.getAnnotation(PermissionFail.class).requestCode();
  } else if(clazz.equals(PermissionSuccess.class)){
    return requestCode == m.getAnnotation(PermissionSuccess.class).requestCode();
  } else {
    return false;
  }
}
 
开发者ID:lovedise,项目名称:PermissionGen,代码行数:10,代码来源:Utils.java

示例6: doFailSomething

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = PERMISSION_WRITE)
public void doFailSomething() {
    UIUtils.toastShort(BaseActivity.this, "权限申请失败,可能影响使用");
}
 
开发者ID:Pingsh,项目名称:Mix,代码行数:5,代码来源:BaseActivity.java

示例7: doFailSomething

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void doFailSomething() {
    Toast.makeText(this, "Permission is failed", Toast.LENGTH_SHORT).show();
}
 
开发者ID:Pingsh,项目名称:Mix,代码行数:5,代码来源:DownLoadActivity.java

示例8: permissionFailure

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void permissionFailure(){
    Toast.makeText(mContext, "permission deny", Toast.LENGTH_SHORT).show();
    setPageState(BaseState.ERROR);
}
 
开发者ID:jiajunhui,项目名称:PlayerBase,代码行数:6,代码来源:LocalVideoListFragment.java

示例9: permissionFailure

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void permissionFailure(){
    setPageState(BaseState.ERROR);
}
 
开发者ID:jiajunhui,项目名称:PlayerBase,代码行数:5,代码来源:LocalVideoFragment.java

示例10: permissionFailure

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void permissionFailure(){
    Toast.makeText(this, "permission deny", Toast.LENGTH_SHORT).show();
    setPageState(BaseState.ERROR);
}
 
开发者ID:jiajunhui,项目名称:PlayerBase,代码行数:6,代码来源:TestListVideoPlayActivity.java

示例11: permissionFail

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void permissionFail() {
    UIUtils.showToast("获取相机权限失败");
}
 
开发者ID:starryxp,项目名称:LQRWeChat-master,代码行数:5,代码来源:TakePhotoActivity.java

示例12: openGroupFail

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
private void openGroupFail() {
    Toast.makeText(this, "读写权限未打开", Toast.LENGTH_SHORT).show();
    textView.setVisibility(View.VISIBLE);
}
 
开发者ID:why168,项目名称:AndroidHttpUtils,代码行数:6,代码来源:WelcomeActivity.java

示例13: doFailSomething

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = SUCCESSCODE)
public void doFailSomething() {
    Toast.makeText(EventContentActivity.this,"Ask for permission failed!",Toast.LENGTH_SHORT).show();
}
 
开发者ID:wendyltan,项目名称:EasyTodo,代码行数:5,代码来源:EventContentActivity.java

示例14: onPermissionFail

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
public void onPermissionFail(){
    Toast.makeText(this, "permission deny", Toast.LENGTH_SHORT).show();
}
 
开发者ID:jiajunhui,项目名称:MediaLoader,代码行数:5,代码来源:MainActivity.java

示例15: openGroupFail

import kr.co.namee.permissiongen.PermissionFail; //导入依赖的package包/类
@PermissionFail(requestCode = 100)
private void openGroupFail() {
    Toast.makeText(this, "Group permission is not granted", Toast.LENGTH_SHORT).show();
}
 
开发者ID:why168,项目名称:AndroidProjects,代码行数:5,代码来源:PermissionGenActivity.java


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