title: Why not open activity from broadcast receiver when application closed in android?
body: <blockquote>
    <p>Code given below.this is the Onreceive method</p>
  </blockquote>
  
  <pre><code>Intent i = new Intent(context,ToastActivity.class);
  i.putExtra("INCOMING_NUMBER", num);
  i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  i.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);                   
  i.setAction(Intent.ACTION_MAIN);
  i.addCategory(Intent.CATEGORY_LAUNCHER);
  context.startActivity(i);
  </code></pre>