问题
I have following code in my SinchService.
@Override
public void onIncomingCall(CallClient callClient, Call call) {
Log.d("Size", "Size : " + call.getHeaders().size());
Log.d(TAG, "onIncomingCall: " + call.getCallId());
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);
}
In the first line i am printing Header size. I am getting correct value for header size when app is active but when app is inactive(terminated) it is 0 for the first incoming call only.
I found the same issue for latest sinch-push tutorial also.
来源:https://stackoverflow.com/questions/39829185/can-not-get-headers-for-sinch-incoming-call-when-application-is-in-close-state-f