How to launch a phonecall from onreceive method of broadcast receiver
<p>when I try to launch this intent sometimes it works and sometime the call ends automatically.i cant figure out the problem.Remember i am doing all this in onReceive(). </p>

<pre><code>Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:+number"));
     callIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
     con.startActivity(callIntent);
</code></pre>
