3

I have try a sinch video calling example in my project but , I can't understand what is CALL_ID in sinchservice class in sinch video calling example.

Ravi
  • 34,851
  • 21
  • 122
  • 183
Pravin Suthar
  • 1,403
  • 1
  • 14
  • 25

1 Answers1

4

That is just custom field name which will be sent when you receive call. It stores unique call id received from Sinch for calling. You can check it in SinchService.java

public static final String CALL_ID = "CALL_ID";

and when you receive call, unique call id will be passed as extra in Intent.

@Override
public void onIncomingCall(CallClient callClient, Call call) {
     Log.d(TAG, "Incoming call");
     Intent intent = new Intent(SinchService.this, IncomingCallScreenActivity.class);
     intent.putExtra(CALL_ID, call.getCallId());
     intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
     SinchService.this.startActivity(intent);
}
Ravi
  • 34,851
  • 21
  • 122
  • 183
  • Hello @RaviRupareliya. I am working on a project which is created as an application and as a website. This application includes app to app video calling as well as app to web video calling also. I have successfully implemented app to app calling, but how can i implement app to web calling. My project includes user1 and user2. User1 calls user2 on app. App to app calling is successful,but user2 can be logged in from website also, then in this case i have to accomplish a video call from app to web. Please help me by some code for how can i achieve this using Sinch library. Thank you. – harshita Jan 25 '18 at 05:59
  • I have already posted a question here: https://stackoverflow.com/questions/48436212/app-to-web-video-calling-using-sinch – harshita Jan 25 '18 at 06:30