Call Blocking in android with Use IT Telephoney Class
<p>I use this code to block a incomming Calls in android Application..</p>

<pre><code>AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); 

audioManager.setStreamMute(AudioManager.STREAM_RING, true);

TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
Class clazz = Class.forName(telephonyManager.getClass().getName());

Method method = clazz.getDeclaredMethod("getITelephony");

method.setAccessible(true);

com.android.internal.telephony.ITelephony telephonyService = (ITelephony) method.invoke(telephonyManager);

telephonyService.silenceRinger();

telephonyService.endCall();
</code></pre>

<p>This Code is not work Properly.. At least one time ringging a phone and after cut calls..
Please.. Some one Give me better solution..</p>
