-1

I am creating a android app on adobe air. I have a button in my app, clicking on which I need to call to a number skipping the dialer and once the call finishes I want the control to return to my app and record the call duration in local db. Someone please help me with code/links to the information.

Currently I am using following code to call the number which goes through the dialer,

navigateToURL(new URLRequest("tel:"+telNumber.text));
Maddy
  • 67
  • 1
  • 12

2 Answers2

0

I do not believe that this is possible. The security model in both Android and iOS is pretty similar: an app cannot spy on another, peek at its data or direct execution. If you could do this, what would stop a malicious application from taking over the phone and doing bizarre things?

Once you leave your app, whether it be to jump to the browser, the maps, or the dialer, you have released control of the screen, and are now in the background with very limited execution capability.

It would be nice if the OS manufacturers opened up their systems more to have a clear API for controlling these fundamental apps. In particular the Apple dialer leaves much to be desired, but Apple bans any app that purports to be a dialer. Frankly the built-in dialers are not that clever, and it would be easy to imagine much better ones. Android is often customized by hardware vendors for this reason, and HTC, Samsung and others have their own dialers.

I don't even believe that the dialer programs agree on their data structures, so you would be on android chasing down 100 dialing programs and 100 different data formats, and for security reasons i don't think you can access the application private data.

I can imagine you would want to do what you are trying to do, but i think you are better off pursuing making your own dialer program, so you don't have to release control of the CPU to an unfriendly 3rd party program. Android won't stop you from making a dialer.

VC.One
  • 14,790
  • 4
  • 25
  • 57
Edward De Jong
  • 151
  • 1
  • 9
0

This is definitely 100% possible, I just did it (by using an ANE). Many apps have this functionality it just requires adding the correct permission on Android (to avoid security problems). Here is the ANE I used to skip the dialer and make an immediate call on Android in Adobe AIR: https://github.com/illuzor/Android-Communication-Extension-ANE (though specifically if anyone else tries using it, you must use AIR 21, using later version like 22 and beyond it did not work)