use of com.fanap.podchat.call.request_model.CallRequest in project pod-chat-android-sdk by FanapSoft.
the class CallPresenter method requestP2PCallWithP2PThreadId.
// Not using yet
@Override
public void requestP2PCallWithP2PThreadId(int threadId) {
// request with threadId
CallRequest callRequest = new CallRequest.Builder(threadId, BASE_CALL_TYPE).build();
if (callRequest.getCallType() == CallType.Constants.VIDEO_CALL) {
showVideoViews();
}
@SuppressLint("MissingPermission") String uniqueId = chat.requestCall(callRequest);
callUniqueIds.add(uniqueId);
callImpUniqueIds.add(uniqueId);
}
use of com.fanap.podchat.call.request_model.CallRequest in project pod-chat-android-sdk by FanapSoft.
the class CallPresenter method requestP2PCallWithContactId.
@SuppressLint("MissingPermission")
@Override
public void requestP2PCallWithContactId(int contactId, int callType) {
List<Invitee> invitees = new ArrayList<>();
Invitee invitee = new Invitee();
invitee.setId(contactId);
invitee.setIdType(InviteType.Constants.TO_BE_USER_CONTACT_ID);
invitees.add(invitee);
// request with invitee list
CallRequest callRequest = new CallRequest.Builder(invitees, callType).setTitle(GROUP_CALL_NAME_PREFIX + contactId).setDescription("Generated at " + new Date().toString()).build();
if (callRequest.getCallType() == CallType.Constants.VIDEO_CALL) {
showVideoViews();
} else {
prepareAudioCallView();
}
String uniqueId;
uniqueId = requestCallByServerType(callRequest);
callUniqueIds.add(uniqueId);
callImpUniqueIds.add(uniqueId);
}
use of com.fanap.podchat.call.request_model.CallRequest in project pod-chat-android-sdk by FanapSoft.
the class CallPresenter method requestGroupCallWithThreadId.
private void requestGroupCallWithThreadId(int threadId, int callType) {
CallRequest callRequest = new CallRequest.Builder(threadId, callType).setTitle(GROUP_CALL_NAME_PREFIX + " " + threadId).setDescription("Generated at " + new Date().toString()).build();
if (callRequest.getCallType() == CallType.Constants.VIDEO_CALL) {
showVideoViews();
} else {
prepareAudioCallView();
}
@SuppressLint("MissingPermission") String uniqueId = chat.requestGroupCall(callRequest);
callUniqueIds.add(uniqueId);
callImpUniqueIds.add(uniqueId);
}
Aggregations