Callkit,如何在锁定屏幕时禁用视频按钮?
您可以将CXProviderConfiguration类属性“supportsVideo”设置为NO,如下所示。
CXProviderConfiguration *configuration = [[CXProviderConfiguration alloc]initWithLocalizedName:@"app name"];
configuration.supportsVideo = NO;
它将禁用视频功能。
更新: 设置CXCallUpdate财产 “hasVideo” 为NO。并删除remoteHandle也。 注意:如果您删除remoteHandle属性,则无法从最近日志回拨。
必须在CXProviderConfiguration中将supportsVideo属性设置为NO。 和非设置supportedHandleTypes。
它只是成为“FaceTime”按钮,仍然可以点击。 – foolishBoy
您必须保留supportedHandleTypes属性才能禁用Facetime按钮。 –
如何? supportedHandleTypes仅支持CXHandleTypeGeneric,CXHandleTypePhoneNumber,CXHandleTypeEmailAddres。 – foolishBoy
不,如果我将“supportsVideo”设置为NO,它就会变成“FaceTime”按钮,并且仍然可以点击。 – foolishBoy
检查所有使用CXProviderConfiguration对象的地方。您还必须在reportIncomingCallWithContact方法中设置supportsVideo。删除INStartVideoCallIntent如果您在info.plist中设置。 –