title: setRepeating() of AlarmManager does not repeat after update apk Versioncode
body: <p><code>setRepeating()</code> of AlarmManager does not repeat after update apk Versioncode</p>
  
  <p>Is there any way to run it automatically, right after update apk?<br>
  The time is already set on previous versioncode, but the alarms work only when the phone restarted.</p>
  
  <pre><code>//SET ALARM
  Cal.setTimeInMillis(System.currentTimeMillis());
  Cal.set(Calendar.HOUR_OF_DAY, hour);
  Cal.set(Calendar.MINUTE, minute);
  Cal.set(Calendar.SECOND, 0);
  
  Editor e = sharedPrefs.edit();
  e.putLong("userTime", Cal.getTimeInMillis());
  e.commit();
  mytime.setSummary(DateFormat.getTimeFormat(getBaseContext())
          .format(new Date(Cal.getTimeInMillis())));
  
  new AlarmTask(UserSettingActivity.this, Cal).run();
  </code></pre>
  
  <p>class  AlarmTask implements Runnable:</p>
  
  <pre><code>private final Calendar date;
  private final AlarmManager am;
  private final Context context;
  
  public AlarmTask(Context context, Calendar date) {
      this.context = context;
      this.am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
      this.date = date;
  }
  
  @Override
  public void run() {
  
      Intent intent = new Intent(context, NotifyService.class);
      intent.putExtra(NotifyService.INTENT_NOTIFY, true);
      PendingIntent pendingIntent = PendingIntent.getService(context, 0, intent, 0);
  
      am.setRepeating(AlarmManager.RTC_WAKEUP, date.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent);
  }
  </code></pre>
  
  <p>Thanks a lot</p>