How to receive call in android
<p>i want to receive incoming call when user press button <br> How to do programatically<br>
i am using following code.      </p>

<pre><code>button1.setOnClickListener(new OnClickListener() {      
    public void onClick(View v) 
    {
        Intent i2=new Intent(Intent.ACTION_ANSWER);
        startActivity(i2);          
    }
});
</code></pre>

<p>But it does not work
any one please tell me how to receive incoming call from my application??</p>
