title: Prevent duplicate activities
body: <p>So, I'm both new to Java and to creating android apps, but not new to programming. I've read through most of the developer.android.com site, but I haven't been able to find this:</p>
  
  <p>I want to make sure that a certain activity isn't running more than once at the same time. So we have a task somewhat like this:<br>
  Activity A) a TabActivity, which launches<br>
  Activity B) a ListView that, on-click, opens up<br>
  Activity C) which is the interface for a mediaplayer object</p>
  
  <p>Right now, whenever somebody presses the back-button whilst in C (Which is a likely thing, because they're going to listen to a streaming 1-hour long mp3) and then presses another list item, instead of returning to C, C is opened a second time, and two streams are playing. Of course, I'd want only one instance of C running, and I want a second click on the list item to bring C back to the front. This could also be useful for notification intents.</p>
  
  <p>I've been messing around with the flags (especially FLAG_ACTIVITY_NEW_TASK, FLAG_ACTIVITY_CLEAR_TOP and FLAG_ACTIVITY_REORDER_TO_FRONT), but no success so far. </p>
  
  <p>If someone could help me out here I could focus on my next challenge - making it a real feed reader :P</p>
  
  <p>Thanks in advance,</p>