title: Cannot Resolve Method setLatestEventInfo
body: <p>I am working on Notifications and I have to use <code>setLatestEventInfo</code>. However, Android Studio shows the following error message: </p>
  
  <blockquote>
    <p>cannot resolve method setLatestEventinfo</p>
  </blockquote>
  
  <p>Here is my code snippet:</p>
  
  <pre><code>private void createNotification(Context context, String registrationID) {
      NotificationManager notificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
      Notification notification = new Notification(R.drawable.icon,"Registration Successfull",System.currentTimeMillis());
      notification.flags |= Notification.FLAG_AUTO_CANCEL;
      Intent intent = new Intent(context,RegistrationResultActivity.class);
      intent.putExtra("registration_ID",registrationID);
      PendingIntent pendingIntent = PendingIntent.getActivity(context,0,intent,0);
      notification.setLatestEventInfo(context,"Registration","Successfully Registered",pendingIntent);
  }
  </code></pre>
  
  <p>Or if their is another way to do so, kindly suggest me that.</p>