title: Why is NotificationManager not accepting my notification
body: <p>I am unable to get <a href="http://developer.android.com/reference/android/app/NotificationManager.html" rel="nofollow noreferrer">NotificationManager</a>'s <a href="http://developer.android.com/reference/android/app/NotificationManager.html#notify(java.lang.String,%20int,%20android.app.Notification)" rel="nofollow noreferrer">Notifiy</a> accept my arguments. The method is supposed to take 3 arguments.</p>
  
  <pre><code>String        tag
  int           id
  Notification  notification
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/5mVqA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5mVqA.png" alt="enter image description here"></a></p>
  
  <p>For constructing the notification, I am using the <a href="http://developer.android.com/reference/android/support/v4/app/NotificationCompat.html" rel="nofollow noreferrer">NotificationCompat</a> class, but I've tried even <a href="http://developer.android.com/reference/android/app/Notification.Builder.html" rel="nofollow noreferrer">Notification.Builder</a>.</p>
  
  <pre><code>import android.app.Notification;
  import android.support.v4.app.NotificationCompat;
  </code></pre>
  
  <p>Regarding my build configuration, it is as follows:</p>
  
  <pre><code>compileSdkVersion 23
  buildToolsVersion "23.0.2"
  
  minSdkVersion 14
  targetSdkVersion 21
  </code></pre>
  
  <p>EDIT: Code transcript:</p>
  
  <pre><code>import android.app.Notification;
  import android.support.v4.app.NotificationCompat;
  
  private void showNotification(Context context, String category, String title, String text, int tag, boolean ongoing)
  {
      NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
  
      Intent intent = new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD);
      PendingIntent pendingIntent = PendingIntent.getActivity(context, new Random().nextInt(), intent, PendingIntent.FLAG_UPDATE_CURRENT);
  
      NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
      builder.setContentTitle(title);
      builder.setContentText(text);
      builder.setContentIntent(pendingIntent);
      builder.setOngoing(ongoing);
      builder.setSmallIcon(R.drawable.ic_launcher);
  
      Notification notification = builder.build();
      notificationManager.showNotification(context, category, title, text, new Random().nextInt(), ongoing);
      notificationManager.notify(null, 0, notification);
  }
  </code></pre>