title: Clear the activity stack before launching activity with intent
body: <p>I'm working on C2DM notification for an Android Application and I'd like to open my application when user click on the notification. There is no problem for that, this is pretty easy.
  The problem is that when the application is launching (after clicking on the notification), if some activity was previously opened, the launched activity seems to be added to the actual activity stack, what is a problem regarding to the complexity of my application (there is a lot of activity, some with static fields).</p>
  
  <p>To solve the problem, 2 solutions would be OK:</p>
  
  <p>1) Do not call a specific activity but just ask to my application to open (like when I click on the application icon on the home screen: Open the first activity if the application was closed or just bring the application to the front if was opened (but was in background)).</p>
  
  <p>2) Clear all the activity stack and launch a specific activity.</p>
  
  <p>But I didn't succeed to do one of both solution. Even using intent flag (like <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP" rel="nofollow">http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP</a>).</p>
  
  <p>Can somebody help me to solve this problem?</p>
  
  <p>Thanks</p>
  
  <p>PS: Sorry for my poor English, I'm from Belgium :-)</p>