Search in sources :

Example 1 with CometChatStartCallActivity

use of com.cometchat.pro.uikit.ui_components.calls.call_manager.CometChatStartCallActivity in project android-java-chat-push-notification-app by cometchat-pro.

the class CallUtils method startCall.

/**
 * This method is used to load <code>CometChatStartCallActivity</code> which starts a call in
 * seperate screen
 * @param context is object of Context
 * @param call is object of Call
 */
public static void startCall(Context context, Call call) {
    Intent intent = new Intent(context, CometChatStartCallActivity.class);
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    intent.putExtra(UIKitConstants.IntentStrings.TYPE, call.getReceiverType());
    intent.putExtra(UIKitConstants.IntentStrings.SESSION_ID, call.getSessionId());
    ((Activity) context).finish();
    intent.putExtra(UIKitConstants.IntentStrings.IS_DEFAULT_CALL, true);
    context.startActivity(intent);
}
Also used : CometChatCallActivity(com.cometchat.pro.uikit.ui_components.calls.call_manager.CometChatCallActivity) CometChatStartCallActivity(com.cometchat.pro.uikit.ui_components.calls.call_manager.CometChatStartCallActivity) Activity(android.app.Activity) Intent(android.content.Intent)

Aggregations

Activity (android.app.Activity)1 Intent (android.content.Intent)1 CometChatCallActivity (com.cometchat.pro.uikit.ui_components.calls.call_manager.CometChatCallActivity)1 CometChatStartCallActivity (com.cometchat.pro.uikit.ui_components.calls.call_manager.CometChatStartCallActivity)1