Right now user is in foreground or background or killed mode, every time video call screen appear by default iphone call screen.
Can we customise the screen like whatsapp.
Can anyone please help me out on this.is it possible or not using sendbird call sdk.
hello @Khusboo_Suhasini
You can customize it by referring to the following codes in Quickstart Sample
.
CXProviderConfiguration
//
// CXProvider+QuickStart.swift
// QuickStart
//
// Copyright © 2020 SendBird, Inc. All rights reserved.
//
import CallKit
import UIKit
extension CXProviderConfiguration {
// The app's provider configuration, representing its CallKit capabilities
static var `default`: CXProviderConfiguration {
let providerConfiguration = CXProviderConfiguration(localizedName: "Sendbird Calls")
if let image = UIImage(named: "icLogoSymbolInverse") {
providerConfiguration.iconTemplateImageData = image.pngData()
}
// Even if `.supportsVideo` has `false` value, SendBirdCalls supports video call.
// However, it needs to be `true` if you want to make video call from native call log, so called "Recents"
// and update correct type of call log in Recents
This file has been truncated. show original
...
let providerConfiguration = CXProviderConfiguration(localizedName: "Sendbird Calls")
if let image = UIImage(named: "icLogoSymbolInverse") {
providerConfiguration.iconTemplateImageData = image.pngData()
}
...
CXCallUpdate
//
// AppDelegate+SendBirdCallsDelegates.swift
// QuickStart
//
// Copyright © 2020 SendBird, Inc. All rights reserved..
//
import UIKit
import CallKit
import SendBirdCalls
// MARK: - Sendbird Calls Delegates
extension AppDelegate: SendBirdCallDelegate, DirectCallDelegate {
// MARK: SendBirdCallDelegate
// Handles incoming call. Please refer to `AppDelegate+VoIP.swift` file
func didStartRinging(_ call: DirectCall) {
call.delegate = self // To receive call event through `DirectCallDelegate`
guard let uuid = call.callUUID else { return }
guard CXCallManager.shared.shouldProcessCall(for: uuid) else { return } // Should be cross-checked with state to prevent weird event processings
This file has been truncated. show original
let update = CXCallUpdate()
update.remoteHandle = CXHandle(type: .generic, value: name)
update.hasVideo = call.isVideoCall
update.localizedCallerName = call.caller?.userId ?? "Unknown"
I think it would be best to refer to the Apple documentation about CallKit.
have a good day.
Thanks @damon.park for your response.
I have changed the logo and name an all.
I want to change the total screen ui.
like in whatsapp if application is in foreground, then on call notification screen u can see your video before receiving the call.
If application in background video call notification will come just like pushnotification format.
Like this i need.