This is a familiar question in SO. and what I need is to end call programmatically. I have searched a lot...
http://androidsourcecode.blogspot.in/2010/10/blocking-incoming-call-android.html http://androiddesk.wordpress.com/2012/08/02/blocking-a-call-without-user-intervention-in-android/
Rejecting Incoming call in android
How to programmatically answer/end a call in Android 4.1?
http://www.emoticode.net/android-sdk/block-incoming-and-outgoing-phone-calls-programmatically.html
how to block a mobile number call and message receiving in android application development?
and http://androidsourcecode.blogspot.in/2010/10/blocking-incoming-call-android.html
and lot more questions, answers and suggestions...
All are saying use ITelephonyService.aidl
in combination with TelephonyManager
and the solution is working perfect on many devices but it's not working on Samsung S Duos. I am struggling over a week but didn't get a solution.. is there any special API to work with on this type of devices? How can I reject incoming call? please help me...
In your Application create a package (com.android.internal.telephony) in java folder. And then copy ITelephone interface in that package
ITelephone interface source: http://grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/2.1_r2/com/android/internal/telephony/ITelephony.java/?v=source
Code for Disconnect Call:
Also add permissions for using this methods:
Try this function:
Try this Sure it will work. It's working fine for me.
You could download the ITelephony.java file from ITelephony.java
After that you add the method to end call:
Function to Disconnect call