androidsinchandroid-sinch-api

Sinch video calling example issue


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.


Solution

  • 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);
    }