Is it possible to detect rejected calls in Android?

后端 未结 3 1408
悲&欢浪女
悲&欢浪女 2020-12-17 03:43

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 inco

3条回答
  •  轮回少年
    2020-12-17 04:22

    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.

提交回复
热议问题