title: Opening an activity from a notification
body: <p>I have an activity called "A" with two buttons. Each button opens other new activities "B" and "C", the activity "A" is in onPause state.
  The activity "C" has a viewpager with 3 pages</p>
  
  <p>This application can receive notifications.</p>
  
  <p>Clicking on a notification received, open the activity "C".</p>
  
  <p>This functions correctly in the following way:</p>
  
  <pre><code>//...
      NotificationManager notificationManager =(NotificationManager) getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE); 
  ...
  Intent intent =new Intent(getApplicationContext(), activityC.class);
          intent.putExtra("hello", notificationData);
  </code></pre>
  
  <p>This is my problem:</p>
  
  <p>I want that when you click the notification received, if my application is showing the activity "A" or "B" or the application is in background, to close and open the activity "C"</p>
  
  <p>If the application is showing the activity "C" leads to a page of the ViewPager (<code>pager.setCurrentItem (2);</code>)</p>
  
  <p>Several days I've been reading, I've tried several ways, using <code>android:launchMode="singleTop"</code> defining <code>FLAG_ACTIVITY_NEW_TASK, FLAG_ACTIVITY_CLEAR_TOP and FLAG_ACTIVITY_SINGLE_TOP</code> ...but always without success</p>
  
  <p>I'm going crazy with this ...</p>
  
  <p>Someone could help me?</p>
  
  <p>Thanks in advance!</p>