title: setting alarm on boot time at a specific time every day
body: <p>I have started alarm of 9:00 AM in android on Boot Completed. But fires alarm every minute after it has completed boot.</p>
  
  <p>My Requirement is it should set Alarm after boot but only fires alarm at 9:00 AM.</p>
  
  <p>Here is my code: 
      public class AlarmUtil {
      private PendingIntent alarmIntent;</p>
  
  <pre><code>public static void setAlarm(Context context) {
  
      AlarmManager alarmManager = (AlarmManager) context
              .getSystemService(Context.ALARM_SERVICE);
  
      Calendar calendar = Calendar.getInstance();
      calendar.set(Calendar.HOUR_OF_DAY, 9);
      calendar.set(Calendar.MINUTE, 00);
      calendar.set(Calendar.SECOND, 00);
      calendar.set(Calendar.AM_PM, Calendar.AM);
      //calendar.setTimeInMillis(calendar.getTimeInMillis());
      calendar.add(Calendar.SECOND, 1);
  
      Intent intent = new Intent(context, Services.class);
      PendingIntent pintent = PendingIntent.getService(context, 123456789,
              intent, 0);
  
      alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
              calendar.getTimeInMillis(), 1 * 60 * 1000, pintent);
  
  }
  }
  
  public class AlarmBroadcastReciever extends BroadcastReceiver {
  
  @Override
  public void onReceive(Context context, Intent intent) {
      if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
          Toast.makeText(context, "Booted!", Toast.LENGTH_SHORT).show();
          AlarmUtil.setAlarm(context);
  
      }
  }
  }
  </code></pre>
  
  <p>services (My service Class)</p>
  
  <pre><code>public class Services extends IntentService {
  
  public Services(String name) {
      super("services");
      // TODO Auto-generated constructor stub
  }
  
  public Services() {
      super("services");
      // TODO Auto-generated constructor stub
  }
  
  @Override
  public void onCreate() {
      super.onCreate();
  
  }
  
  @Override
  public int onStartCommand(Intent intent, int flags, int startId) {
      MyApp.counter += 1;
  
      Toast.makeText(getApplicationContext(),
              "Service started: " + MyApp.counter, Toast.LENGTH_LONG).show();
      return START_STICKY;
  }
  
  @Override
  public IBinder onBind(Intent arg0) {
      // TODO Auto-generated method stub
      return null;
  }
  
  @Override
  protected void onHandleIntent(Intent intent) {
      Toast.makeText(getApplicationContext(), "handling intent",
              Toast.LENGTH_LONG).show();
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>where i am lacking. Please help me. Thanks in advance.</p>