* Once we have the time instance in milliseconds as a Calendar object and the pending intent pointing to the receiver, we can set up an alarm by calling the set() method of the alarm manager.
am.set(AlarmManager.RTC_WAKEUP,
cal.getTimeInMillis(),
pi);
*If you use AlarmManager.RTC_WAKEUP, the alarm will wake up the device.
* Or you can use AlarmManager.RTC in its place to deliver the intent when the device wakes up.
* The time specified by the second argument is the instance in time specified by the calendarObject that was created earlier.
* This time in milliseconds since 1970.This also coincides with the Java Calendar object default.
* When the method is called, the alarm manager will invoke the TestReceiver in 30 seconds after the time when the method is called.
am.set(AlarmManager.RTC_WAKEUP,
cal.getTimeInMillis(),
pi);
*If you use AlarmManager.RTC_WAKEUP, the alarm will wake up the device.
* Or you can use AlarmManager.RTC in its place to deliver the intent when the device wakes up.
* The time specified by the second argument is the instance in time specified by the calendarObject that was created earlier.
* This time in milliseconds since 1970.This also coincides with the Java Calendar object default.
* When the method is called, the alarm manager will invoke the TestReceiver in 30 seconds after the time when the method is called.