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?
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
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.