title: How to open fragment page, when pressed a notification in android
body: <p>I am trying to open a fragment when I press a notification in the notification bar. My app structure is:</p>
  
  <ul>
  <li>a base activity with a nav drawer menu </li>
  <li><p>some fragment that are opened from menu</p>
  
  <pre><code>b.setOnClickListener(new OnClickListener() {
  
          @SuppressWarnings({ "deprecation", "static-access" })
          public void onClick(View v) {
  
          w_nm=(NotificationManager) getActivity().getSystemService(getActivity().NOTIFICATION_SERVICE);
  
           Notification notify=new Notification(R.drawable.notnificationlogo,waternoti,System.currentTimeMillis());
  
           Intent notificationIntent = new Intent(getActivity(), Abc.class);
  
  
  
           PendingIntent pending=PendingIntent.getActivity(getActivity(), 0,notificationIntent, 0);
  
  
           notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
                   | Intent.FLAG_ACTIVITY_SINGLE_TOP );
  
          notify.flags = Notification.DEFAULT_LIGHTS | Notification.FLAG_AUTO_CANCEL;
  
             notify.setLatestEventInfo(getActivity(),waternoti,waternoti1, pending);
  
           w_nm.notify(0, notify);
  </code></pre></li>
  </ul>
  
  <p>Can anyone tell me how to link with next fragment page (the present code is in class that extends fragment)</p>