I am able to block incoming calls in android but problems it rings for fraction of seconds before disconnection of time. How can i directly disconnect phone without single ringi
It is Mission Impossible for the time being. Viewing the reason here : Why it is impossible to intercept incoming calls on Android
But I suggest you still a temporary solution I myself adopted :
Before to block the call, the first thing you need to do is retrieve the current mode of the phone ringing, and then turn on silent :
AudioManager audiomanage = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
int ringerMode = audiomanage.getRingerMode();
audiomanage.setRingerMode(AudioManager.RINGER_MODE_SILENT);
After blocking the call (or not) gives you the initial mode :
audiomanage.setRingerMode(ringerMode);
You'll need these permissions :
I hope I helped you.