Callkit,如何在锁定屏幕时禁用视频按钮?

3
作为iOS10的新功能,CallKit非常强大。当屏幕被锁定时,我该如何禁用"视频"按钮?就像下面图片底部所示: 例子
2个回答

1

您必须将CXProviderConfiguration中的supportsVideo属性设置为NO。并且不设置supportedHandleTypes。


它只是变成了“FaceTime”按钮,仍然可以点击。 - foolishBoy
您必须保留 supportedHandleTypes 属性以禁用 Facetime 按钮。 - Thành Vũ
如何使用supportedHandleTypes只支持CXHandleTypeGeneric、CXHandleTypePhoneNumber、CXHandleTypeEmailAddress。 - foolishBoy

1
您可以将CXProviderConfiguration类的属性“supportsVideo”设置为NO,如下所示。
CXProviderConfiguration *configuration = [[CXProviderConfiguration alloc]initWithLocalizedName:@"app name"];
configuration.supportsVideo = NO;

它将禁用视频功能。
更新: 将CXCallUpdate属性“hasVideo”设置为NO,并删除remoteHandle。 注意:如果删除remoteHandle属性,则无法从最近通话记录中回拨。

不,如果我将“supportsVideo”设置为NO,它仅变成“FaceTime”按钮,仍然可以点击。 - foolishBoy
检查所有使用CXProviderConfiguration对象的地方。您还必须在reportIncomingCallWithContact方法中设置supportsVideo。如果在info.plist中设置了INStartVideoCallIntent,请将其删除。 - RJV Kumar

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接