难道possbile检测机器人拒绝来电? [英] Is it possbile to detect rejected calls in Android?
问题描述
在我的应用程序这将是很好,当用户拒绝呼叫拦截,即选择发送忙音。 有什么办法,除了被通知当有来电时,要做到这一点? 我还没有发现在这方面的文档任何东西。 这个信息存储在通话记录,即我可以查询通话记录,看是否有呼叫被拒绝或回答?
In my application it would be nice to intercept when the user rejects a call, i.e. choose to send busy tone. Is there any way, besides being notified when there is an incoming call, to do this? I have not found anything in the docs regarding this. Is this information stored in the call log, i.e. can I poll the call log to see if a call was rejected or answered?
任何资料或指向文档大大AP preciated。
Any information or pointers to documentation is greatly appreciated.
推荐答案
嘿。
您可以使用 PhoneStateListener
和 CallLog
类查询最近通话列表找到拒绝的呼叫。
Hey.
You could use the PhoneStateListener
and CallLog
classes to query the recent calls list to find rejected calls.
http://developer.android.com/reference/android/provider/ CallLog.html 的http://developer.android.com/reference/android/telephony/PhoneStateListener.html
另外,您可以监视广播 android.intent.action.NEW_OUTGOING_CALL
和 android.intent.action.NEW_INCOMING_CALL
只是把 android.permission.PROCESS_INCOMING_CALLS
和 android.permission.PROCESS_OUTGOING_CALLS
在你的清单。
Alternatively you can monitor broadcasts on android.intent.action.NEW_OUTGOING_CALL
and android.intent.action.NEW_INCOMING_CALL
just put android.permission.PROCESS_INCOMING_CALLS
and android.permission.PROCESS_OUTGOING_CALLS
in your manifest.
这篇关于难道possbile检测机器人拒绝来电?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!