This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Android and the fly likes Scheduling Date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Scheduling Date " Watch "Scheduling Date " New topic
Author

Scheduling Date

Sahil Reddy
Ranch Hand

Joined: Jan 24, 2011
Posts: 145
Hello Pals

I was trying to set scheduled event after some time and i achieved it through Alarm Manager.

Now i want to schedule event at some future date and time , but not getting a way to set Date in alarm . Please give me directions...


Regards
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

If you look at the value for AlarmManager.INTERVAL_DAY (or any of the other constants) you will notice that they are millisecond values. So just determine the number of milliseconds between now and the desired wakeup time and pass that value to AlarmManager.set().


JBoss In Action
Sahil Reddy
Ranch Hand

Joined: Jan 24, 2011
Posts: 145
Thanks peter , i did the same , used Calendar class to achieve the same .
Sahil Reddy
Ranch Hand

Joined: Jan 24, 2011
Posts: 145
Setting the alarm is the right way or i should say the better way or setting an Event in Calendar is better.

If setting an Event in Calendar is better then do you know how to Use Calendar Events , i mean setting and retrieving Events.


Regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scheduling Date
 
Similar Threads
Remove Security Warning ..
displaying time
My clairvoyant left thigh
Running a thread in background in servlet
addActionListener problem