use of com.fanap.podchat.call.request_model.TurnCallParticipantVideoOffRequest in project pod-chat-android-sdk by FanapSoft.
the class CallAsyncRequestsManager method createTurnOffVideoMessage.
public static String createTurnOffVideoMessage(long callId, String uniqueId) {
ArrayList<Long> ids = new ArrayList<>();
ids.add(CoreConfig.userId);
TurnCallParticipantVideoOffRequest request = new TurnCallParticipantVideoOffRequest.Builder(callId, ids).build();
AsyncMessage message = new AsyncMessage();
message.setType(ChatMessageType.Constants.TURN_OFF_VIDEO_CALL);
message.setToken(CoreConfig.token);
message.setSubjectId(request.getCallId());
message.setTokenIssuer(CoreConfig.tokenIssuer);
message.setUniqueId(uniqueId);
message.setTypeCode(Util.isNullOrEmpty(request.getTypeCode()) ? request.getTypeCode() : CoreConfig.typeCode);
JsonObject a = (JsonObject) App.getGson().toJsonTree(message);
return a.toString();
}
use of com.fanap.podchat.call.request_model.TurnCallParticipantVideoOffRequest in project pod-chat-android-sdk by FanapSoft.
the class CallAsyncRequestsManager method createTurnOnVideoMessage.
public static String createTurnOnVideoMessage(long callId, String uniqueId) {
ArrayList<Long> ids = new ArrayList<>();
ids.add(CoreConfig.userId);
TurnCallParticipantVideoOffRequest request = new TurnCallParticipantVideoOffRequest.Builder(callId, ids).build();
AsyncMessage message = new AsyncMessage();
message.setType(ChatMessageType.Constants.TURN_ON_VIDEO_CALL);
message.setToken(CoreConfig.token);
message.setSubjectId(request.getCallId());
message.setTokenIssuer(CoreConfig.tokenIssuer);
message.setUniqueId(uniqueId);
message.setTypeCode(Util.isNullOrEmpty(request.getTypeCode()) ? request.getTypeCode() : CoreConfig.typeCode);
JsonObject a = (JsonObject) App.getGson().toJsonTree(message);
return a.toString();
}
Aggregations