Can not get Headers for sinch incoming call when application is in close state for the first time only

送分小仙女□ 提交于 2019-12-10 18:53:23

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!