标签: callkit

如何使用CallKit拨打非语音电话?

我想使用新的iOS 10 CallKit从应用程序拨打电话,但使用默认运营商。可能吗?如果是这样,怎么办?

目前正在使用:

public void dial(String number) {
  NSURL url = new NSURL("tel://" + number);
  UIApplication.getSharedApplication().openURL(url);
}
Run Code Online (Sandbox Code Playgroud)

ios callkit

4
推荐指数
1
解决办法
1598
查看次数

使用CXEndCallAction请求事务时出错

在使用CXEndCallAction请求CXTransaction时,事务失败并显示错误代码Error Domain = com.apple.CallKit.error.requesttransaction Code = 4"(null)"

我成功地制作了一个CXStartCallAction.有谁知道这个错误意味着什么?

voip ios10 callkit

4
推荐指数
1
解决办法
5196
查看次数

如何在结束调用后删除CallKit的回调选项UI

在我的应用程序中,我使用CallKit进行来电.应用中没有拨出电话功能.一切都很好但是当接收器或dailer结束呼叫时,它会显示带有回叫选项的CallKit UI.我不想显示回调选项,我该怎么办呢?

我结束通话的代码

func end(call: SpeakerboxCall) {

    let endCallAction = CXEndCallAction(call: call.uuid)
    let transaction = CXTransaction()
    transaction.addAction(endCallAction)

    requestTransaction(transaction, action: "endCall")

}

private func requestTransaction(_ transaction: CXTransaction, action:
    String = "") {

    callController.request(transaction) { error in
        if let error = error {
            print("Error requesting transaction: \(error)")
        } else {
            print("Requested transaction \(action) successfully")
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

ios swift callkit

4
推荐指数
1
解决办法
1156
查看次数

iOS 13没有在后台获取VoIP推送通知

我正在使用CallKit和PushKit在Swift中开发软电话。在iOS 13之前,VoIP通知运行良好。但是,在iOS 13更新之后,我的应用程序在后台运行时没有收到VoIP推送通知。在前台didReceiveIncomingPushWith被调用,但在后台不被调用。

如何解决此问题?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Override point for customization after application launch.
    print("\(#function)")
    let voipPushResgistry = PKPushRegistry(queue: nil)
    voipPushResgistry.delegate = self
    voipPushResgistry.desiredPushTypes = [PKPushType.voIP]

    return true
}

func pushRegistry(_ registry: PKPushRegistry, didInvalidatePushTokenFor type: PKPushType) {
    print("\(#function) token invalidated")
}

func pushRegistry(_ registry: PKPushRegistry, didUpdate credentials: PKPushCredentials, for type: PKPushType) {
    let deviceToken = credentials.token.reduce("", {$0 + String(format: "%02X", $1) })
    print("\(#function) token is: \(deviceToken)")
}

func …
Run Code Online (Sandbox Code Playgroud)

iphone pushkit callkit ios13 xcode11

4
推荐指数
2
解决办法
2919
查看次数

CallKit查找用于从本机电话应用启动应用的号码

我在我们的应用程序中实现了CallKit.我们的应用程序制作调用显示在本机电话应用程序的最新列表中.

在最近列表中点击我们的应用程序条目时,我们的应用程序已启动.有没有办法找出用于启动我们的应用程序的数字(/条目)?(openURL或其他)

ios callkit

3
推荐指数
1
解决办法
1670
查看次数

从CallKit禁用"添加呼叫"选项

有没有办法在接收VoIP呼叫时禁用Callkit的"添加呼叫"选项?

我找不到任何api来禁用它.但WhatsApp禁用了此功能.

ios ios10 callkit

3
推荐指数
2
解决办法
3104
查看次数

到底什么时候才调用CallKit的didActivate?

到底什么时候调用CallKit的didActivate

我应该如何激活会话?

官方文档和扬声器样本解释得不好。

ios swift callkit

3
推荐指数
1
解决办法
751
查看次数

持续时间后呼叫超时功能 Callkit

我尝试Timer在接到电话后 12 秒添加超时,CallKit但是Appdelegate当应用程序处于后台时它不会被触发。我的代码:

self.callBackgroundHandlerIdentifier = UIApplication.shared.beginBackgroundTask(expirationHandler: { 
            UIApplication.shared.endBackgroundTask(self.callBackgroundHandlerIdentifier!)
            self.callBackgroundHandlerIdentifier = UIBackgroundTaskInvalid
        })
        DispatchQueue.global(qos: .userInitiated).async {
            AppDelegate.callAnswerTimer = Timer.scheduledTimer(timeInterval: 12, target: self, selector: #selector(AppDelegate.hangUpOnCallTimeOut), userInfo: nil, repeats: false)

            self.callBackgroundHandlerIdentifier = UIBackgroundTaskInvalid
        }

func hangUpOnCallTimeOut(){
        AppDelegate.timeOutTimer?.invalidate()
        AppDelegate.timeOutTimer = nil
        if #available(iOS 10.0, *) {
            ProviderDelegate.sharedInstance.endCall(uuids: ApplicationDelegate.activeCalls!) { (uuid) in }
        }
        if self.callBackgroundHandlerIdentifier != UIBackgroundTaskInvalid {
            UIApplication.shared.endBackgroundTask(self.callBackgroundHandlerIdentifier!)
        }
    }
Run Code Online (Sandbox Code Playgroud)

任何想法我做错了什么?

ios ios10 callkit

3
推荐指数
1
解决办法
1793
查看次数

如何在Android上使用react native实现CallKit相似的行为?

我有一个用react-native编写的应用程序来处理用户之间的Voip调用.我需要在推送通知时唤醒应用程序并显示接受/拒绝呼叫的屏幕.

在iOS上有callkit,Android有什么类似的东西吗?

android voip push-notification react-native callkit

3
推荐指数
1
解决办法
4124
查看次数

如何在 swift 4 iOS 中将 Callkit 与 Agora VOiP 集成?

我想在 swift 4 iOS 中将 Apple Callkit 与 Agora VOiP 集成。

请给出任何建议我该怎么做。

iphone swift3 callkit agora.io

3
推荐指数
1
解决办法
2182
查看次数