I cant get to set desire time of AlarmCLock in Android
<p>Hi guys this is what i have so far:</p>

<pre><code>PendingIntent sender = PendingIntent.getBroadcast(mainactivity, 0, intent, 0);
             Calendar calendar = Calendar.getInstance();
             calendar.setTimeInMillis(System.currentTimeMillis());
             calendar.add(Calendar.SECOND, 10);
             AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
             alarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), sender);
             showmsg();
</code></pre>

<p>the alarm comes after 10 seconds How can I make it in desire time i want, I have set a timepicker so how can i do it depending on the timepickers time to ring the alarm?</p>

<p>Thanx.</p>
