Why repeated alarm not working?
<p>I created a calender object and the code is as follows:</p>

<pre><code>Intent intent=new Intent(ListDemoActivity.this, Demo1.class);
PendingIntent pi =PendingIntent.getBroadcast(ListDemoActivity.this, 0, intent,0);
AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(System.currentTimeMillis());
calendar.set(Calendar.HOUR_OF_DAY,8);
calendar.set(Calendar.MINUTE,0);
calendar.set(Calendar.SECOND,2);
Log.d("Test", "Current time: " + System.currentTimeMillis() );
Log.d("Test", "Calendar time: " + calendar.getTimeInMillis() );
//calendar.add(Calendar.SECOND,8);
am.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),10*1000,pi); 
</code></pre>

<p>I first tried to trigger alarm after every 10 seconds but the alarm triggered only once.
I also printed current time and new time after addition, but the current time is greater than the new one.</p>

<pre><code>12-12 12:57:29.506: D/Test(783): Current time: 1323674849507
12-12 12:57:29.506: D/Test(783): Calendar time: 1323657002506
</code></pre>

<p>Why code not working?</p>
