Closed Technozer closed 3 months ago
For iOS, you need to send voip push notification not just notification. voip push can wake up app when app is in terminated state
Can you share a detailed demo? How to send voip notifications on the app side and also receive side view call kill and how to set up voip notification?
On Tue, Aug 6, 2024 at 4:58 PM Hien Nguyen @.***> wrote:
For iOS, you need to send voip push notification not just notification. voip push can wake up app when app is in terminated state
— Reply to this email directly, view it on GitHub https://github.com/hiennguyen92/flutter_callkit_incoming/issues/571#issuecomment-2271063623, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV2LF2AQVRTHZ6ZRJ6EWBG3ZQCXOHAVCNFSM6AAAAABMBWCG76VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZRGA3DGNRSGM . You are receiving this because you authored the thread.Message ID: @.***>
Now facing new issue SwiftFlutterCallKitIncomigPlugin file Error: uuid is nil
@objc public func showCallkitIncoming(_ data: Data, fromPushKit: Bool) { self.isFromPushKit = fromPushKit if(fromPushKit){ self.data = data }
var handle: CXHandle?
handle = CXHandle(type: self.getHandleType(data.handleType), value: data.getEncryptHandle())
let callUpdate = CXCallUpdate()
callUpdate.remoteHandle = handle
callUpdate.supportsDTMF = data.supportsDTMF
callUpdate.supportsHolding = data.supportsHolding
callUpdate.supportsGrouping = data.supportsGrouping
callUpdate.supportsUngrouping = data.supportsUngrouping
callUpdate.hasVideo = data.type > 0 ? true : false
callUpdate.localizedCallerName = data.nameCaller
initCallkitProvider(data)
let uuid = UUID(uuidString: data.uuid)
configurAudioSession()
guard self.sharedProvider != nil else {
print("Error: sharedProvider is nil")
return
}
guard let uuid = uuid else {
print("Error: uuid is nil")
return
}
self.sharedProvider?.reportNewIncomingCall(with: uuid, update: callUpdate) { error in
if(error == nil) {
self.configurAudioSession()
let call = Call(uuid: uuid, data: data)
call.handle = data.handle
self.callManager.addCall(call)
self.sendEvent(SwiftFlutterCallkitIncomingPlugin.ACTION_CALL_INCOMING, data.toJSON())
self.endCallNotExist(data)
}
}
}
Error: uuid is nil
also using showCallkitIncoming( uuid: const Uuid().v4(), title: message.data['doctorName'], body: message.data['body'], profile: message.data['doctorProfile'], callType: callType, customRoomId: customRoomId, videoCallId: message.data['videoCallId'], appointmentPatientName: message.data['appointmentPatientName'], isVideoCall: message.data['isVideoCall'], );
On Wed, Aug 7, 2024 at 9:52 AM Hien Nguyen @.***> wrote:
Please check with https://github.com/hiennguyen92/flutter_callkit_incoming/blob/master/PUSHKIT.md
— Reply to this email directly, view it on GitHub https://github.com/hiennguyen92/flutter_callkit_incoming/issues/571#issuecomment-2272589469, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV2LF2E7HDW6VK4KDPQQBCDZQGOIDAVCNFSM6AAAAABMBWCG76VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZSGU4DSNBWHE . You are receiving this because you authored the thread.Message ID: @.***>
You have to make sure that the data you transmit has UUID.
this code is working for me in terminate state
i was using view call kit firebase FCM to send notification to send notificaion using FCM -> FirebaseMessaging.onMessage.listen -> flutter_call_incoming
And also when app was forgroung state view call kit on after app was kill auto cut call only this two issue face on iOS kill state.
Call kit is not showing even though notification is received when in kill state only iOS. otherwise andorid all stack view call kit and iOS Only background and forgrond working fine.
iOS AppDelegte code :
import UIKit import FirebaseCore import Flutter import Firebase import CallKit import AVFAudio import PushKit import flutter_callkit_incoming
@UIApplicationMain @objc class AppDelegate: FlutterAppDelegate, PKPushRegistryDelegate, CallkitIncomingAppDelegate { // var window : UIWindow?
override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { FirebaseApp.configure()
}
}