Can a program answer an incomming call instead of the user having to click "Answer"

54 views
Skip to first unread message

pirateman1966

unread,
Feb 1, 2014, 11:07:31 AM2/1/14
to android-...@googlegroups.com
Last time I checked 2 years ago, the android telephony sdk did not have a way for a program to take control of the phone functions like answer and hang up without the user interaction! is this still true? I need to be able to read the incoming call's number (Caller ID) and answer with a prerecorded message or let the phone ring for the user to answer.
Is that possible with Android?
Thanks.

Michael Moussa

unread,
Feb 2, 2014, 4:58:19 PM2/2/14
to android-...@googlegroups.com
Is this a platform question or an app question? If an app question, the answer is no and you are asking in the wrong forum. If a platform question, could you provide us more details, are you trying to create your own build of Android to overcome the issue or something?

Kozlov

unread,
Feb 4, 2014, 1:47:19 AM2/4/14
to android-...@googlegroups.com
You may try this ( we did this few years back probably in ICS, not sure if it still works)
Get reference to windowManagerservice
create a KeyEvent with keycode KEYCODE_CALL and injectKeyEvent using windowManager .
Note: above things are not exposed to developers , this is a kind of hack, also with every new release of android u may have to check if ur code still works.
Reply all
Reply to author
Forward
0 new messages