简体   繁体   English

iOS - 从我的应用程序以编程方式进行 WhatsApp 语音/视频通话

[英]iOS - Make WhatsApp voice/video call programmatically from my application

I have a requirement to make WhatsApp calls from my application.我需要从我的应用程序中进行 WhatsApp 调用。 When I click the mobile number in my app then it should redirect to WhatsApp and initiate voice/video calls without user intervention.当我在我的应用程序中单击手机号码时,它应该重定向到 WhatsApp 并在无需用户干预的情况下发起语音/视频通话。 I've found a solution from the below link but it's opening application and landing on user chat window.我从下面的链接中找到了一个解决方案,但它正在打开应用程序并登陆用户聊天 window。

https://faq.whatsapp.com/en/iphone/23559013 https://faq.whatsapp.com/en/iphone/23559013

There isn't an api for that.没有 api 。 Whatsapp only allows interactions like sharing media such as video, audio and images as mentioned in the FAQ . Whatsapp 仅允许像常见问题解答中提到的共享媒体(如视频、音频和图像)之类的交互。 I tried searching for official developer doc for one of my requirements but, was unsuccessful the FAQ seems to be the only official doc availabe:我尝试为我的要求之一搜索官方开发人员文档,但未成功,FAQ 似乎是唯一可用的官方文档:

If your application creates photos, videos, or audio notes and you'd like your users to share these media using WhatsApp, you can use the Document Interaction API to send your media to your WhatsApp contacts and groups.如果您的应用程序创建照片、视频或音频笔记,并且您希望您的用户使用 WhatsApp 共享这些媒体,您可以使用文档交互 API 将您的媒体发送给您的 WhatsApp 联系人和群组。

The only thing you could do is open the contact page for the user.您唯一能做的就是打开用户的联系页面。 And then he has to call by manually clicking on call button.然后他必须通过手动单击呼叫按钮来呼叫。 Maybe, give an info that suggests user to do so.也许,提供建议用户这样做的信息。

if #available(iOS 10.0, *) {
   UIApplication.shared.open(NSURL(string: "whatsapp://send?phone=+91phonenumber")! as URL)
} else {
   UIApplication.shared.openURL(NSURL(string: "whatsapp://send?phone=+91phonenumber")! as URL)
}

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

相关问题 用于从 iOS 应用程序(语音呼叫 VOIP)以编程方式进行 WhatsApp 呼叫的 URL 方案? - Url scheme for making WhatsApp call programmatically from iOS app (voice call VOIP)? 应用程序处于前台/后台/kill 状态时如何断开视频/语音通话 iOS 13. 与 WhatsApp 应用程序相同 - How to disconnect the video/voice call when the application is in foreground/background/kill states iOS 13. Same as WhatsApp application 如何在Objective-C中通过我的IOS应用程序进行Whats App语音呼叫 - How to make whats app Voice calls from my IOS Application in Objective-C 以编程方式从iPhone应用程序拨打电话 - Make call from iphone application programmatically 在UI元素上以编程方式调用iOS无障碍语音 - Call iOS accessibility voice over programmatically on a UI element 如何从应用程序拨打 WhatsApp 电话 - Swift - How to make a WhatsApp call from app - Swift 如何在Mac OS X应用程序中以编程方式调用iOS - How to programmatically call iOS from within a mac os x application Sinch iOS应用程序:确定该应用程序是否收到视频或语音呼叫 - Sinch iOS app : Identifying if the app receives video or voice call 如何从我的应用程序发送图像到WhatsApp? - How send image to WhatsApp from my application? 将WhatsApp集成到iOS应用程序中 - Integration of WhatsApp into an iOS application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM