1

In my application I want to put a feature for blocking incoming calls.

For this I refereed this link

And its work perfectly but it takes nearly 2 seconds to end the call not instantly.

And at caller side a tune of The person your calling busy at the movement gets listen.

Is it possible to end the call without ringing?

Community
  • 1
  • 1
Jay Vyas
  • 2,674
  • 5
  • 27
  • 58
  • maybe link of [this](http://stackoverflow.com/a/17379800/1275574) answer is useful! – AminM Feb 18 '14 at 12:33
  • Thank you but i already refereed this link – Jay Vyas Feb 18 '14 at 12:35
  • 1
    i am facing the same problem, and i tried each and everything that i can find it on internet. I think this can only be done at root level. I dont know how. If some one can please tell me how. I be very thankful to you. – Syed Raza Mehdi May 15 '14 at 14:02

1 Answers1

-1

Try this in your code.

@Override
public void onReceive(Context context, Intent intent) 
{
    String number = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
    setResultData(null); //It will terminate the call
    Toast.makeText(context, "Call Terminated" + number, 5000).show();
}
Shakti
  • 1,581
  • 2
  • 20
  • 33
Jigar Shekh
  • 2,800
  • 6
  • 29
  • 54