how to display dialog when user get incoming call on default call screen in android
<p>i want to display dialog or view on incoming call for that i use following code</p>

<pre><code>public class MyBroadcastReceiver extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {

    TelephonyManager telephony = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
    MyPhoneStateListener customPhoneListener = new MyPhoneStateListener(context);

    telephony.listen(customPhoneListener, PhoneStateListener.LISTEN_CALL_STATE);

    Bundle bundle = intent.getExtras();

    String phone_number = bundle.getString("incoming_number");
    System.out.println("Phone Number : " + phone_number);
    NotificationManager nm = (NotificationManager) context.getSystemService(
            Context.NOTIFICATION_SERVICE);
    nm.notify("Success",1,nm.)
}

}

public class MyPhoneStateListener extends PhoneStateListener {

public MyPhoneStateListener(Context context) {
    super();
    this.context = context;
}
Context context;
@Override
public void onCallStateChanged(int state, String incomingNumber) {
    // TODO Auto-generated method stub
    super.onCallStateChanged(state, incomingNumber);
    System.out.println("Icoming Number inside onCallStateChange : "  + incomingNumber);
    switch (state) {
    case TelephonyManager.CALL_STATE_RINGING:
        System.out.println("PHONE RINGING.........TAKE IT.........");
        Dialog dialog = new PopUpOnGetingCallActivity(context);
        dialog.show();
        break;
    case TelephonyManager.CALL_STATE_OFFHOOK:
        System.out.println("CALL_STATE_OFFHOOK...........");
        break;
    case TelephonyManager.CALL_STATE_IDLE:
        System.out.println("CALL_STATE_IDLE...........");
        break;
    }
}

}
</code></pre>

<p>i test it on real device but not expected output come, no dialog box display when any one call me
can any one tell me pls what can i do for display dialog or notification on incoming call? what is the 
my mistake? and what i required more?
i also add permmision in manifest file which is below</p>

<pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.popup.call"
android:versionCode="1"
android:versionName="1.0" &gt;

&lt;uses-sdk android:minSdkVersion="10" /&gt;

&lt;uses-permission android:name="android.permission.RECEIVE_SMS" /&gt;
&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
&lt;uses-permission android:name="android.permission.WRITE_CONTACTS" /&gt;
&lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;

&lt;application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" &gt;
    &lt;receiver android:name=".MyBroadcastReceiver" &gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.PHONE_STATE" /&gt;
        &lt;/intent-filter&gt;
    &lt;/receiver&gt;
&lt;/application&gt;

&lt;/manifest&gt;
</code></pre>
