简体   繁体   English

当用户从 callkit 按下 facetime 按钮时没有委托或通知

[英]There is no delegate or notification when user pressed facetime button from callkit

I had a VoIP app which should support video call.我有一个应该支持视频通话的 VoIP 应用程序。 So, I oppen the app, lock the screen, then receive an incoming audio call.所以,我打开应用程序,锁定屏幕,然后接听来电。 The problem is I did not figure out how to get notify when user presssed on "facetime" (video call) button.问题是我不知道如何在用户按下“facetime”(视频通话)按钮时获得通知。 Basicaly user is lead to the app but nothing is happening since I did know to what delegate or notification to listen.基本上用户被引导到应用程序,但没有发生任何事情,因为我确实知道要收听的委托或通知。
I looked over Skipe app and it seems to get notified when video call button is pressed on the call screen.我查看了 Skipe 应用程序,当在通话屏幕上按下视频通话按钮时,它似乎会收到通知。 So when "facetime" button is pressed in Skipe app user is lead to the app and video stream begins.因此,当在 Skipe 应用程序中按下“facetime”按钮时,用户会被引导到应用程序并开始视频流。

In short words, can some one points me which kind of delegate or notification should I listen in order to get notify when user pressed on video button from call kit?简而言之,有人可以指出我应该听哪种委托或通知,以便在用户按下呼叫工具包中的视频按钮时收到通知?

Acording to this post: https://stackoverflow.com/a/43487523/6296389 , there is an AppDelegate method that notify the app when video buttons is pressed from native CallKit screen when phone is locked.根据这篇文章: https ://stackoverflow.com/a/43487523/6296389,有一个 AppDelegate 方法可以在手机锁定时从原生 CallKit 屏幕按下视频按钮时通知应用程序。
Objective C delegate method is: Objective C 委托方法是:

    - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler

You should check if:您应该检查是否:

    [userActivity.activityType isEqualToString:@"INStartVideoCallIntent"] 

to identify if received action is a start video intent.识别接收到的动作是否是开始视频意图。

Swift version迅捷版

func application(_ application: UIApplication,
          continue userActivity: NSUserActivity,
          restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {

    if userActivity.activityType == "INStartVideoCallIntent" {
        // treat start video
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在CallKit UI中隐藏FaceTime按钮 - Hide FaceTime button in CallKit UI 按下邮件按钮时不调用UIDocumentInteractionController委托方法 - UIDocumentInteractionController delegate method do not called when pressed on mail button 在屏幕关闭时在iPhone上按下按钮时收到通知 - Getting a notification when a button is pressed on the iPhone when the screen is off 用户点击“返回”按钮时呼叫代表 - Call delegate when user tap “Back” button 检测何时从App Delegate通过UITabBarController按下tabBar项 - detect when a tabBar item is pressed via UITabBarController from App Delegate 当按下推送通知的“确定”按钮时显示页面 - Show a page when OK button of push notification is pressed iOS - 用户在“设置”中手动启用“推送通知”时的委托方法 - iOS - Delegate method when user turns on Push Notification manually in Settings 通话记录和CallKit视频按钮中的INStartVideoCallIntent - INStartVideoCallIntent from call history and CallKit video button ABPersonViewController没有显示Facetime按钮吗? - ABPersonViewController is not showing facetime button? 当应用程序处于非活动状态时,带有 CallKit 的 VOIP 通知不会调用 reportIncomingCall state - VOIP notification with CallKit is not invoking reportIncomingCall when app is inactive killed state
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM