HI:
When you listen to incoming calls from other contacts, you can listen to the incoming calls of other contacts on the page in the meeting. But in other activities, you can't listen to incoming calls, why is that? I wrote it according to the code in the https://github.com/webex/webex-android-sdk/wiki Here's the code for my mainactivity:
webexViewModel.setIncomingListener()
webexViewModel.incomingListenerLiveData.observe(this@MainActivity, Observer {
it?.let {
val callId = it.getCallId()
Log.d("IncomingCall", "Call: $callId, Webex Calling: ${it.isWebexCallingOrWebexForBroadworks()}, CUCM Call: ${it.isCUCMCall()}")
if(callId != null){
Log.d("IncomingCall", "Call ID: $callId, Webex : ${it.isWebexCallingOrWebexForBroadworks()}, CUCM Call: ${it.isCUCMCall()}")
if(CallObjectStorage.getCallObject(callId) != null){
Log.d("IncomingCall", "Call ID: $callId, Webex Calling: ${it.isWebexCallingOrWebexForBroadworks()}, CUCM : ${it.isCUCMCall()}")
if(!it.isWebexCallingOrWebexForBroadworks() && !it.isCUCMCall()) {
Handler(Looper.getMainLooper()).post {
Log.d("IncomingCall", "Call ID: $callId, Webex Calling: ${it.isWebexCallingOrWebexForBroadworks()}, Call: ${it.isCUCMCall()}")
startActivity(CallMeetingActivity.getIncomingIntent(this, it.getCallId()))
}
}
}
}
}
})