title: How to open activity from push notification and ignore the previous state of application
body: <p>I am working on an android application. It receives a push notification . I want to open an activity P when user opens the notification. </p>
  
  <p>My application has the following hierarchy of activities:</p>
  
  <ol>
  <li>Main Activity (M) , which creates three fragments(F1, F2, F3).</li>
  <li>F3 has one more fragment inside it (F31). F31 has a listview which displays some list of videos . User can play any video form here.</li>
  <li>When user clicks any video from F31 , it creates and activity P, for playing the video.</li>
  </ol>
  
  <p>Now when i receive the push notification and open it, i want to open the activity P . But I also want that when activity P is launched and user presses back , then it should go to F31 . Because the parent of P is F31.</p>
  
  <p>My application can be in any state when user opens the push notification . I mean user can be in F1 or F2 or F3 . But when user open the push notification it should launch the activity P and on back press it should go to F31 .
  It should ignore the previous state of the application.</p>
  
  <p>I can launch the Activity P from Push Notification , But i am not sure how to guarantee that on back press it will land on F31.</p>
  
  <p>Please suggest how should i proceed ?</p>