How to programmatically answer a call?

2019-01-11 20:21发布

I want to answer a phone call. I found the intent android.intent.action.ANSWER but it seems that the only effect that I obtain is an ActivityNotFoundException. Why? Is it a deprecated intent? How can I achieve answer? I have also heard about the "telnet technique". What is that?

Thanks

8条回答
Lonely孤独者°
2楼-- · 2019-01-11 21:17

It's not possible, check this thread for further information.

查看更多
\"骚年 ilove
3楼-- · 2019-01-11 21:18
try {
Runtime.getRuntime().exec("input keyevent"+Integer.toString(KeyEvent.KEYCODE_HEADSETHOOK));
} catch (IOException e) {
   //handle error here
}
查看更多
登录 后发表回答