本文整理汇总了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);
}
}
示例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);
}
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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);
}
}
}