-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: show video call for push notification #30
Conversation
add CallNotificationTypeManager add CallNotificationType setting UI refactor AccountTableViewController
unregister webhooks when changing call notification type.
save apns device token with the key "apnsDeviceToken"
|
||
func endCurrentCall() { | ||
if CallNotificationTypeManager.shared.getCurrentCallNotificationType() == .videoCall { | ||
endCurrentCallKitCall() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can call this in the SDK's callback function "callEnded"? So based on usingCallKit
we could decide to hide uikit or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
callEnded happens after endCurrentCall()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, ok, so you end call kit call and it's delegate will call BMXCallKit.shared.endCall()
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
@@ -185,5 +233,57 @@ extension CallsService: PKPushRegistryDelegate, CXProviderDelegate { | |||
func provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) { | |||
BMXCallKit.shared.disconnectSoundDevice() | |||
} | |||
|
|||
func rejectCallForPushNotification(userInfo: [AnyHashable: Any]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when do you call it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently when app is in the foreground, the video call will begin automatically if an initial call push notification comes. I wanted to add some simple UI to give users a selection to accept or reject the call, so I added this function. Later I thought it was just a demo app, maybe I don't need to provide this selection. So I didn't add the selection but forgot deleting the function.
What do yo think about it?
Do you think we should provide a selection for users in this scenario?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can have a reject button, but would you need to call BMXCallKit.shared.processCall
to reject it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I need to get a correct incomingCallProcessor because BMXCallKit.shared.endCall
calls processor?.endCall(guid: callId)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, that is not obvious and I think can confuse a SDK user, maybe process call should be inside BMXCallKit.shared.endCall then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion. I will make changes inside BMXCallKit.shared.endCall then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sviatoslavbmx I talked with Yurii and ended up adding a preview call UI for push notification with answer button and reject button, but I don't need rejectCallForPushNotification any more because I will directly use CallsService.shared.endCurrentCall()
rename video to voip for CallNotificationType
remove rejectCallForPushNotification
No description provided.