title: Schedule notification with alarm manager
body: <p>I'm facing a little issue with my alarmManager. I'm trying to register an alarm to display a notification at spicified time. Here is how I'm doing it:</p>
  
  <pre><code>Utils.SetAlarm(this, Utils.GOODMORNING, 7, 0, 0); // so at 7:00
  </code></pre>
  
  <hr>
  
  <pre><code>public static void SetAlarm(Context context, int req, int hour, int minute, int second) {
      AlarmManager am = (AlarmManager) context.getSystemService(context.ALARM_SERVICE);
      Intent intent = new Intent(context, myService.class);
      intent.putExtra(ACTION_REQUEST, req);
      PendingIntent pi = PendingIntent.getService(context, 0, intent, 0);
  
      Calendar calendar = Calendar.getInstance();
      calendar.set(Calendar.HOUR_OF_DAY, hour);
      calendar.set(Calendar.MINUTE, minute);
      calendar.set(Calendar.SECOND, second);
  
      am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pi);
  }
  </code></pre>
  
  <hr>
  
  <pre><code>public class myService extends IntentService {
  private static final int GOODMORNING_NOTIFICATION_REQUEST = 517;
  
  public myService() {
      super("myService");
  }
  
  @Override
  protected void onHandleIntent(Intent intent) {
      int extra = intent.getIntExtra(Utils.ACTION_REQUEST, 0);
  
      if (extra == Utils.GOODMORNING) {
          Notification notification = new Notification.Builder(this)
                  .setContentTitle("title")
                  .setContentText("content")
                  .setSmallIcon(R.drawable.ic_launcher)
                  .setAutoCancel(true)
                  .build();
  
          NotificationManager notificationManager =
                  (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
  
          notificationManager.notify(GOODMORNING_NOTIFICATION_REQUEST, notification);
      }
  }
  </code></pre>
  
  <hr>
  
  <p>The issue I'm facing is that the notifcation appear immediatly after i run the Utils.SetAlarm void. It will also appear fine at 7:00 am so it's apparently working but i wonder if someone known a way to avoid this problem. Thanks</p>