Making and monitoring phone call within phonegap
Asked Answered
L

2

8

I'm considering building a PhoneGap app that would work with my web app via web socket. 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.

Can this be done in PhoneGap? Can this be approved for iOS?

Note: this is a feasibility question, not a give-me-code question.

Lunette answered 7/10, 2016 at 15:5 Comment(2)
Obvioiusly not in javascript (you need to build java plugin)... so, what is the point of using PhoneGap at all?Impenitent
You can't do it in iOS, even in native app. In Android you would have to create JAVA plugin, setup a broadcast listener, and get the call information.Coimbatore
S
3

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. Prior to iOS 10, I have used twilio API which does the same things as mentioned in your question.

  • Yes, it is possible in phonegap using the custom plugins.
  • Yes, the application will be approved for iOS.
Sluggish answered 15/10, 2016 at 14:17 Comment(0)
B
2

Can this be done in PhoneGap?

No, you'd have to develop a plugin for each platform.

Can this be approved for iOS?

All samples I found to similar problems use deprecated APIs, so probably not. I am not an ios developer, which is why I am not sure. More information here Detecting the call events in ios


I know that this is possible on Android, see How to detect incoming calls, in an Android device?


It is not possible on Windows phone, see Is there any way to monitor phone call info on Windows Phone 7?

Barbiturism answered 10/10, 2016 at 11:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.