[英]Android: howto pick up automatically when a certain number calls?
I want to create a program for Android which picks up automatically when a certain number calls and answer with dtmf tone. 我想为Android创建一个程序,当某个号码呼叫并以dtmf音接听时自动接听。 Is this possible in Android Java?
Android Java中有可能吗?
If you just wanted to be aware that a certain number had called and then do some non call action, such as log the call, send a notification to a server etc then you can simply use the Android TelephonyManager () and create a BroadcastReceiver to listen for incoming call events. 如果您只是想知道某个号码已被呼叫,然后执行一些非呼叫操作,例如记录呼叫,向服务器发送通知等,则可以简单地使用Android TelephonyManager()并创建BroadcastReceiver来监听用于来电事件。 There are quite a few examples of how to use it to detect incoming calls available with a quick search.
关于如何使用它来检测快速搜索中可用的传入呼叫,有很多示例。
If you want to actually answer the call then strictly speaking in 'standard' Android terms you can't. 如果您想实际接听电话,那么严格说来,您不能使用“标准” Android术语。 However, take a look at this excellent answer (not mine...) for some workarounds which may possibly work for you depending on your particular solution (whether your target devices are rooted etc):
但是,请看以下出色的答案(不是我的...),这取决于您的特定解决方案(无论您的目标设备是否已植根等等),可能对您有用的一些解决方法:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.