title: Android: onCreate() getting called multiple times (and not by me)
body: <p>There is something I don't quite understand right now.</p>
  
  <p>My main activity class creates a Service, which creates a new thread that waits for a TCP connection. Once one comes in, it will start a new activity:</p>
  
  <pre><code>Intent dialogIntent = new Intent(getBaseContext(), VoIPCall.class);
  dialogIntent.putExtra("inetAddress", clientSocket.getInetAddress());
  dialogIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  getApplication().startActivity(dialogIntent);
  </code></pre>
  
  <p>After that, the <code>onCreate()</code> method of that class gets run. It will create 2 threads: one records and send data, the other one receive and plays data. Those threads have a forever while loop.</p>
  
  <p>For some reason, I notice that the <code>onCreate()</code> of that last class gets called again, which makes my program crash. I do not understand why it is called again as only the 2 threads are running, there is no user interaction. The documentation says: "Called when the activity is first created.". The activity is already running and I am not trying to create it.</p>
  
  <p>Could someone please explain me this behavior?</p>