简体   繁体   English

如何以编程方式接听电话

[英]How to programmatically answer a call

I know this has been asked before , but at this time the answer of the post is not true. 我知道之前曾有人问过这个问题 ,但目前该帖子的答案不正确。 Vringo and other apps does answer the phone by pressing a button on their app, so there must be a way to do it. Vringo和其他应用程序确实通过按其应用程序上的按钮来接听电话,因此必须有一种方法来实现。

Anyone has a suggestion? 有人有建议吗?

Check out this source: 查看此来源:

http://code.google.com/p/auto-answer/source/browse/trunk/src/com/everysoft/autoanswer/AutoAnswerIntentService.java http://code.google.com/p/auto-answer/source/browse/trunk/src/com/everysoft/autoanswer/AutoAnswerIntentService.java

They send a Bluetooth "keydown" event to answer the call! 他们发送蓝牙“ keydown”事件来接听电话!

This solution is 'funny', it 'almost' works on my HUAWEI Y300 (4.1.1) but on my LG E410 Swift L1 (4.1.2) not. 这个解决方案是“有趣的”,它几乎可以在我的HUAWEI Y300(4.1.1)上使用,但在我的LG E410 Swift L1(4.1.2)上却不能使用。

On HUAWEI it works with KeyEvent.ACTION_UP, when on LG there is no reaction for ACTION_UP event. 在HUAWEI上,它与KeyEvent.ACTION_UP一起使用,而在LG上,对ACTION_UP事件没有任何反应。 From other side, on HUAWEI the ACTION_DOWN event does not answer a call, but on LG it rejects it. 从另一方面来看,在HUAWEI上,ACTION_DOWN事件不会接听电话,但在LG上,它会拒绝呼叫。

So different models of a devices have different reactions. 因此,不同型号的设备会有不同的反应。

Someone has some updates in this issue ? 有人在这个问题上有更新吗? Is there an another working solution, which behaves in same way for all mobile phones, and does not require from a device to be rooted ? 是否存在另一种可行的解决方案,该解决方案对于所有移动电话都具有相同的行为,并且不需要从设备植根?

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

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