Start Activity from Service always opens MainActivity
<p>When I start an activty after receiving a GCM Message, it starts, next to the desired Activity, the MainActivity also. The problem is, I want to display the disired Activty (DialogActivity) as a Dialog-Box-Style Activity, so its background is transparent.</p>

<p>This is how I start the Activity:</p>

<pre><code>@Override
protected void onMessage(Context arg0, Intent arg1) {
  Log.d("GCM", "RECIEVED A MESSAGE");
  generateNotification(arg0, arg1.getStringExtra("message"));
  Intent i = new Intent();
    i.setClass(this, DialogActivity.class);
    i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(i); 
   }
</code></pre>

<p>This is the theme in the styles.xml</p>

<pre><code>&lt;style name="Theme.Transparent" parent="android:Theme"&gt;
&lt;item name="android:windowIsTranslucent"&gt;true&lt;/item&gt;
&lt;item name="android:windowBackground"&gt;@android:color/transparent&lt;/item&gt;
&lt;item name="android:windowContentOverlay"&gt;@null&lt;/item&gt;
&lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
&lt;item name="android:windowIsFloating"&gt;true&lt;/item&gt;
&lt;item name="android:backgroundDimEnabled"&gt;false&lt;/item&gt;
</code></pre>

<p></p>

<p>So the transparent Activity is laying on top of the MainActivity, which I want to avoid. It should show only the DialogActivity. Anyone knows help?</p>
