title: setcontentview() not working for activity
body: <p>In my app I have Broadcast reciever and an activity.</p>
  
  <p>Whenever an outgoing call is made broadcast receiver receives and sends an intent to the activity. I am starting this activity from receiver. when I am making a call This Activity is starting but The view is not set in that activity. I am using <code>setContentView()</code>. </p>
  
  <p>CallReciever.java</p>
  
  <pre><code>public class CallReceiver extends BroadcastReceiver
  {     @Override
  public void onReceive(Context context, Intent intent)
  {
  
  
  String phoneNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
  Bundle bundle1 = new Bundle();
  bundle1.putString("phone_number", phoneNumber);
  Intent intent1 = new Intent();
  intent1.setClass(context, NewActivity.class);
  intent1.putExtras(bundle1);
  intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  intent1.setAction("NewActivity");
  intent1.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
  context.startActivity(intent1);
  </code></pre>
  
  <p>NewActivity.java</p>
  
  <pre><code>public class NewActivity extends Activity {
  @Override
   public void onNewIntent(Intent intent){
      super.onNewIntent(intent);
      Bundle bundle = getIntent().getExtras();
      String phoneNumber =  bundle.getString("phone_number");
    setContentView(R.layout.temp);
  </code></pre>
  
  <hr>
  
  <pre><code>     &lt;activity android:name=".NewActivity"
       android:launchMode="singleTop"
       android:label="@string/app_name1"&gt;
  
       &lt;intent-filter&gt;
       &lt;action android:name="NewActivity"/&gt;
       &lt;/intent-filter&gt;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
  Bundle bundle = getIntent().getExtras();
  String phoneNumber =  bundle.getString("phone_number");
  
   setContentView(R.layout.temp);
  }   }
  </code></pre>
  
  <p>I have overridden onCreate method also.Now I am getting ForceClose Dialog.what should I do.?</p>
  
  <p>Regarding layout.I am using normal Linear Layout and text-view.</p>