VoIP: in-app notif add content action
This commit is contained in:
parent
40446c7a31
commit
edf4841371
|
@ -174,10 +174,11 @@ class CallService : VectorService(), WiredHeadsetStateReceiver.HeadsetEventListe
|
||||||
matrixItem = opponentMatrixItem,
|
matrixItem = opponentMatrixItem,
|
||||||
avatarRenderer = avatarRenderer,
|
avatarRenderer = avatarRenderer,
|
||||||
isVideoCall = isVideoCall,
|
isVideoCall = isVideoCall,
|
||||||
onAccept = { acceptIncomingCall(call) },
|
onAccept = { showCallScreen(call, VectorCallActivity.INCOMING_ACCEPT) },
|
||||||
onReject = { call.endCall() }
|
onReject = { call.endCall() }
|
||||||
)
|
)
|
||||||
dismissedAction = Runnable { call.endCall() }
|
dismissedAction = Runnable { call.endCall() }
|
||||||
|
contentAction = Runnable { showCallScreen(call, VectorCallActivity.INCOMING_RINGING) }
|
||||||
}
|
}
|
||||||
alertManager.postVectorAlert(incomingCallAlert)
|
alertManager.postVectorAlert(incomingCallAlert)
|
||||||
}
|
}
|
||||||
|
@ -189,11 +190,11 @@ class CallService : VectorService(), WiredHeadsetStateReceiver.HeadsetEventListe
|
||||||
startForeground(NOTIFICATION_ID, notification)
|
startForeground(NOTIFICATION_ID, notification)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun acceptIncomingCall(call: WebRtcCall){
|
private fun showCallScreen(call: WebRtcCall, mode: String) {
|
||||||
val intent = VectorCallActivity.newIntent(
|
val intent = VectorCallActivity.newIntent(
|
||||||
context = this,
|
context = this,
|
||||||
mxCall = call.mxCall,
|
mxCall = call.mxCall,
|
||||||
mode = VectorCallActivity.INCOMING_ACCEPT
|
mode = mode
|
||||||
)
|
)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue