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.
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.
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 theendCall()
methodFirst create this Interface:
Then Create this class that extends BroadcastReceiver
This will only block that single phonenumber, but you get the point.
In your manifest add this: