How to Reject a call programatically in android

后端 未结 2 1167
悲哀的现实
悲哀的现实 2020-12-02 19:49

In my app I will maintain a list of contacts.

Any calls from contacts in the list will be dropped. They will show under missed calls but the phone will not ring.

2条回答
  •  醉酒成梦
    2020-12-02 19:59

    Download the class of ITelephony from here.

    Then put it in a package (make a new package) of com.android.internal.telephony. Then import the package to the appropriate class and for rejecting a call use the endCall() method

提交回复
热议问题