How to set phone's alarm from program code in Android
<p>I want to set phones alarm in phone.
Can anybody say how to do that?</p>

<p>I got the code from net, and try but the alram not set to phone.</p>

<pre><code>Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis());
Intent activate = new Intent(this, Alaram.class);
AlarmManager alarams ;
PendingIntent alarmIntent = PendingIntent.getBroadcast(this, 0, activate, 0);
alarams = (AlarmManager) getSystemService(ALARM_SERVICE);
alarams.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), alarmIntent);
</code></pre>

<p>In this code we are provide intent as <code>Alaram.class.</code>
Then what should be written in this <code>Alram.class</code> so that alarm will set to the mobile.</p>
