简体   繁体   English

在phonegap中拨打和监视电话

[英]Making and monitoring phone call within phonegap

I'm considering building a PhoneGap app that would work with my web app via web socket. 我正在考虑构建一个可以通过Web套接字与我的Web应用程序一起使用的PhoneGap应用程序。 It would receive the instruction to dial a phone number, run in the background while the phone call is in progress, detect when the phone call picks up and when the call hangs up, and then resume so that the call information is sent back via ajax. 它会收到以下指令:拨打电话号码,在通话过程中在后台运行,检测电话接听的时间以及电话挂断的时间,然后恢复以通过ajax发送回电话信息。

Can this be done in PhoneGap? 可以在PhoneGap中完成吗? Can this be approved for iOS? 可以批准用于iOS吗?

Note: this is a feasibility question, not a give-me-code question. 注意:这是一个可行性问题,而不是“给我代码”问题。

For using any native functionality like location, call etc; 用于使用任何本地功能,例如位置,呼叫等; developers have to create plugins. 开发人员必须创建插件。 For iOS 10 and upcoming versions, apple has introduced callkit framework which allows you to programmatic access to VoIP functionality , as well as call blocking and identification. 对于iOS 10和即将推出的版本,Apple引入了callkit框架 ,该框架允许您以编程方式访问VoIP functionality以及呼叫阻止和识别。 Prior to iOS 10, I have used twilio API which does the same things as mentioned in your question. 在iOS 10之前,我使用过twilio API ,它的功能与您提到的问题相同。

  • Yes, it is possible in phonegap using the custom plugins. 是的,可以使用自定义插件在phonegap中进行操作。
  • Yes, the application will be approved for iOS. 是的,该应用程序将被批准用于iOS。

Can this be done in PhoneGap? 可以在PhoneGap中完成吗?

No, you'd have to develop a plugin for each platform. 不,您必须为每个平台开发一个插件。

Can this be approved for iOS? 可以批准用于iOS吗?

All samples I found to similar problems use deprecated APIs, so probably not. 我发现类似问题的所有示例都使用了不推荐使用的API,所以可能不是。 I am not an ios developer, which is why I am not sure. 我不是ios开发人员,所以我不确定。 More information here Detecting the call events in ios 在此处了解更多信息在ios中检测通话事件


I know that this is possible on Android, see How to detect incoming calls, in an Android device? 我知道这在Android上是可行的,请参阅如何在Android设备上检测来电?


It is not possible on Windows phone, see Is there any way to monitor phone call info on Windows Phone 7? 在Windows Phone上无法使用,请参阅有什么方法可以在Windows Phone 7上监视电话信息吗?

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM