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


Java EasyPermissions.onRequestPermissionsResult方法代码示例

本文整理汇总了Java中pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult方法的典型用法代码示例。如果您正苦于以下问题:Java EasyPermissions.onRequestPermissionsResult方法的具体用法?Java EasyPermissions.onRequestPermissionsResult怎么用?Java EasyPermissions.onRequestPermissionsResult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pub.devrel.easypermissions.EasyPermissions的用法示例。


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

示例1: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //导入方法依赖的package包/类
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {

    switch (requestCode){
        case 1:
            if (grantResults.length>0 && grantResults[0]==PackageManager.PERMISSION_GRANTED){
                openAlbum();
            }else {
                Toast.makeText(UIUtils.getContext(),"你关闭了权限功能",Toast.LENGTH_SHORT).show();
            }
            break;

        default:
            break;
    }

    super.onRequestPermissionsResult(requestCode, permissions, grantResults);

    // Forward results to EasyPermissions
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
开发者ID:android-jian,项目名称:topnews,代码行数:22,代码来源:SettingFragment.java

示例2: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //导入方法依赖的package包/类
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);

    // Forward results to EasyPermissions
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
开发者ID:xm0625,项目名称:VBrowser-Android,代码行数:8,代码来源:MainActivity.java

示例3: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //导入方法依赖的package包/类
/**
 * EsayPermissions接管权限处理逻辑
 * @param requestCode
 * @param permissions
 * @param grantResults
 */
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);

    // Forward results to EasyPermissions
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
开发者ID:RuanXiaoHui,项目名称:ZxingScan,代码行数:14,代码来源:MainActivity.java

示例4: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //导入方法依赖的package包/类
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);

    // EasyPermissions handles the request result.
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:8,代码来源:CaptureActivity.java

示例5: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //导入方法依赖的package包/类
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
开发者ID:hsj-xiaokang,项目名称:OSchina_resources_android,代码行数:6,代码来源:InvitationActivity.java

示例6: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //导入方法依赖的package包/类
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:BaseActivity.java

示例7: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //导入方法依赖的package包/类
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:LetvBaseActivity.java

示例8: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //导入方法依赖的package包/类
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
开发者ID:CodingCodersCode,项目名称:EvolvingNetLib,代码行数:6,代码来源:UploadRequestActivity.java

示例9: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //导入方法依赖的package包/类
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
开发者ID:hsj-xiaokang,项目名称:OSchina_resources_android,代码行数:5,代码来源:SettingsFragment.java

示例10: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //导入方法依赖的package包/类
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    // Forward results to EasyPermissions
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
开发者ID:CommonsLab,项目名称:CommonsLab,代码行数:7,代码来源:MainActivity.java

示例11: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //导入方法依赖的package包/类
/**
 * Respond to requests for permissions at runtime for API 23 and above.
 *
 * @param requestCode  The request code passed in
 *                     requestPermissions(android.app.Activity, String, int, String[])
 * @param permissions  The requested permissions. Never null.
 * @param grantResults The grant results for the corresponding permissions
 *                     which is either PERMISSION_GRANTED or PERMISSION_DENIED. Never null.
 */
@Override
public void onRequestPermissionsResult(int requestCode,
                                       @NonNull String[] permissions,
                                       @NonNull int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    EasyPermissions.onRequestPermissionsResult(
            requestCode, permissions, grantResults, this);
}
 
开发者ID:webianks,项目名称:Crimson,代码行数:18,代码来源:CheckupReminders.java

示例12: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //导入方法依赖的package包/类
/**
 * Respond to requests for permissions at runtime for API 23 and above.
 *
 * @param requestCode  The request code passed in
 *                     requestPermissions(android.app.Activity, String, int, String[])
 * @param permissions  The requested permissions. Never null.
 * @param grantResults The grant results for the corresponding permissions
 *                     which is either PERMISSION_GRANTED or PERMISSION_DENIED. Never null.
 */
@Override
public void onRequestPermissionsResult(int requestCode,
                                       @NonNull String[] permissions,
                                       @NonNull int[] grantResults) {
    context.onRequestPermissionsResult(requestCode, permissions, grantResults);
    EasyPermissions.onRequestPermissionsResult(
            requestCode, permissions, grantResults, this);
}
 
开发者ID:Pl4gue,项目名称:homeworkManager-android,代码行数:18,代码来源:AddHomeworkPresenter.java


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