Android on incoming call change the name on screen
<p>I'am trying to make an application that when someone calls me, and lets I see 000-111-222-333 on the screen (thats the number of who ever is calling me) I will change the number to lets say "God".</p>

<p>I'am using a pre-made example that i found on the net and was woundering if you can guide me to complete the code.</p>

<p>Heres what i'v got so far:</p>

<p>public class ServiceReceiver extends BroadcastReceiver {</p>

<pre><code>@Override
public void onReceive(Context context, Intent intent) {
    MyPhoneStateListener phoneListener=new MyPhoneStateListener(context);
    TelephonyManager telephony = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);

    telephony.listen(phoneListener,PhoneStateListener.LISTEN_CALL_STATE);
}
</code></pre>

<p>}</p>

<p>And the second class:</p>

<p>public class MyPhoneStateListener extends PhoneStateListener {</p>

<pre><code>Context con;
public MyPhoneStateListener(Context context)
{
    con = context;
}


public void onCallStateChanged(int state,String incomingNumber){
    switch(state)
    {
       case TelephonyManager.CALL_STATE_IDLE:
            Log.d("DEBUG", "IDLE");
            break;
       case TelephonyManager.CALL_STATE_OFFHOOK:
            Log.d("DEBUG", "OFFHOOK");
            break;
       case TelephonyManager.CALL_STATE_RINGING:


    }
}   
</code></pre>

<p>}</p>

<p>What i want to do is instead of the LOG  func, create a function that will change the number on the screen.</p>

<p>I'm lost.</p>

<p>Please help!</p>
