title: Android alarm manager every week
body: <p>In my android application i need to show notification to user every monday at 09.00. I using alarm manager for this. bur it doeesnt work.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>public void addReminder() {
      Intent alarmIntent = new Intent(this, WeeklyReminderReceiver.class);
      AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
      Calendar calendar = Calendar.getInstance();
  
      calendar.set(Calendar.DAY_OF_WEEK, 2);
      calendar.set(Calendar.HOUR_OF_DAY, 9);
      calendar.set(Calendar.MINUTE, 0);
      calendar.set(Calendar.SECOND, 0);
      calendar.set(Calendar.MILLISECOND, 0);
  
      alarmManager.setRepeating(
              AlarmManager.RTC_WAKEUP,
              calendar.getTimeInMillis(),
              AlarmManager.INTERVAL_DAY * 7,
              PendingIntent.getBroadcast(this, 1, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT));
  }
  </code></pre>
  
  <p>But this code doesn't work properly. Can anyone help me with this?</p>