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


Java PermissionCheckUtil.checkPermissions方法代码示例

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


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

示例1: onRequestPermissionsResult

import io.rong.imkit.utilities.PermissionCheckUtil; //导入方法依赖的package包/类
@TargetApi(23)
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    switch (requestCode) {
        case REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS:
            if (PermissionCheckUtil.checkPermissions(this, AUDIO_CALL_PERMISSIONS)) {
                if (startForCheckPermissions) {
                    startForCheckPermissions = false;
                    RongCallClient.getInstance().onPermissionGranted();
                } else {
                    initView();
                }
            } else {
                if (startForCheckPermissions) {
                    startForCheckPermissions = false;
                    RongCallClient.getInstance().onPermissionDenied();
                } else {
                    finish();
                }
            }
            break;

        default:
            super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    }
}
 
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:27,代码来源:MultiAudioCallActivity.java

示例2: onActivityResult

import io.rong.imkit.utilities.PermissionCheckUtil; //导入方法依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS) {
        if (PermissionCheckUtil.checkPermissions(this, AUDIO_CALL_PERMISSIONS)) {
            if (startForCheckPermissions) {
                startForCheckPermissions = false;
                RongCallClient.getInstance().onPermissionGranted();
            } else {
                initView();
            }
        } else {
            if (startForCheckPermissions) {
                startForCheckPermissions = false;
                RongCallClient.getInstance().onPermissionDenied();
            } else {
                finish();
            }
        }

    } else {
        if (callSession.getEndTime() != 0) {
            finish();
            return;
        }
        shouldShowFloat = true;
        if (resultCode == RESULT_OK) {
            ArrayList<String> invited = data.getStringArrayListExtra("invited");
            RongCallClient.getInstance().addParticipants(callSession.getCallId(), invited);
        }
    }
}
 
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:33,代码来源:MultiAudioCallActivity.java

示例3: onRequestPermissionsResult

import io.rong.imkit.utilities.PermissionCheckUtil; //导入方法依赖的package包/类
@TargetApi(23)
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    switch (requestCode) {
        case REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS:
            boolean permissionGranted;
            if (mediaType == RongCallCommon.CallMediaType.AUDIO) {
                permissionGranted = PermissionCheckUtil.checkPermissions(this, AUDIO_CALL_PERMISSIONS);
            } else {
                permissionGranted = PermissionCheckUtil.checkPermissions(this, VIDEO_CALL_PERMISSIONS);

            }
            if (permissionGranted) {
                if (startForCheckPermissions) {
                    startForCheckPermissions = false;
                    RongCallClient.getInstance().onPermissionGranted();
                } else {
                    setupIntent();
                }
            } else {
                if (startForCheckPermissions) {
                    startForCheckPermissions = false;
                    RongCallClient.getInstance().onPermissionDenied();
                } else {
                    finish();
                }
            }
            break;
        default:
            super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    }

}
 
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:34,代码来源:SingleCallActivity.java

示例4: onActivityResult

import io.rong.imkit.utilities.PermissionCheckUtil; //导入方法依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS) {

        String[] permissions;
        if (mediaType == RongCallCommon.CallMediaType.AUDIO) {
            permissions = AUDIO_CALL_PERMISSIONS;
        } else {
            permissions = VIDEO_CALL_PERMISSIONS;
        }
        if (PermissionCheckUtil.checkPermissions(this, permissions)) {
            if (startForCheckPermissions) {
                RongCallClient.getInstance().onPermissionGranted();
            } else {
                setupIntent();
            }
        } else {
            if (startForCheckPermissions) {
                RongCallClient.getInstance().onPermissionDenied();
            } else {
                finish();
            }
        }

    } else {
        super.onActivityResult(requestCode, resultCode, data);
    }
}
 
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:29,代码来源:SingleCallActivity.java

示例5: onActivityResult

import io.rong.imkit.utilities.PermissionCheckUtil; //导入方法依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS) {
        if (PermissionCheckUtil.checkPermissions(this, VIDEO_CALL_PERMISSIONS)) {
            if (startForCheckPermissions) {
                startForCheckPermissions = false;
                RongCallClient.getInstance().onPermissionGranted();
            } else {
                initViews();
                setupIntent();
            }
        } else {
            if (startForCheckPermissions) {
                startForCheckPermissions = false;
                RongCallClient.getInstance().onPermissionDenied();
            } else {
                finish();
            }
        }

    } else {
        if (callSession.getEndTime() != 0) {
            finish();
            return;
        }
        setShouldShowFloat(true);
        if (resultCode == RESULT_OK) {
            ArrayList<String> invited = data.getStringArrayListExtra("invited");
            RongCallClient.getInstance().addParticipants(callSession.getCallId(), invited);
        }
    }
}
 
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:34,代码来源:MultiVideoCallActivity.java

示例6: onActivityResult

import io.rong.imkit.utilities.PermissionCheckUtil; //导入方法依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS) {
        if (PermissionCheckUtil.checkPermissions(this, VIDEO_CALL_PERMISSIONS)) {
            if (startForCheckPermissions) {
                startForCheckPermissions = false;
                RongCallClient.getInstance().onPermissionGranted();
            } else {
                initViews();
                setupIntent();
            }
        } else {
            if (startForCheckPermissions) {
                startForCheckPermissions = false;
                RongCallClient.getInstance().onPermissionDenied();
            } else {
                finish();
            }
        }

    } else if (requestCode == REQUEST_CODE_ADD_MEMBER) {
        if (callSession.getEndTime() != 0) {
            finish();
            return;
        }
        setShouldShowFloat(true);
        if (resultCode == RESULT_OK) {
            ArrayList<String> invited = data.getStringArrayListExtra("invited");
            RongCallClient.getInstance().addParticipants(callSession.getCallId(), invited);
        }
    }
}
 
开发者ID:sealtalk,项目名称:sealtalk-android,代码行数:34,代码来源:MultiVideoCallActivity.java

示例7: onActivityResult

import io.rong.imkit.utilities.PermissionCheckUtil; //导入方法依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS) {
        if (PermissionCheckUtil.checkPermissions(this, AUDIO_CALL_PERMISSIONS)) {
            if (startForCheckPermissions) {
                startForCheckPermissions = false;
                RongCallClient.getInstance().onPermissionGranted();
            } else {
                initView();
            }
        } else {
            if (startForCheckPermissions) {
                startForCheckPermissions = false;
                RongCallClient.getInstance().onPermissionDenied();
            } else {
                finish();
            }
        }

    } else if (requestCode == REQUEST_CODE_ADD_MEMBER) {
        if (callSession.getEndTime() != 0) {
            finish();
            return;
        }
        shouldShowFloat = true;
        if (resultCode == RESULT_OK) {
            ArrayList<String> invited = data.getStringArrayListExtra("invited");
            RongCallClient.getInstance().addParticipants(callSession.getCallId(), invited);
        }
    }
}
 
开发者ID:sealtalk,项目名称:sealtalk-android,代码行数:33,代码来源:MultiAudioCallActivity.java


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