permaculture playing cards
The moose likes Java Micro Edition and the fly likes Check for time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Check for time" Watch "Check for time" New topic

Check for time


Joined: Jan 08, 2005
Posts: 1
hi there,
I'm doing a calendar. And this calendar allows users to enter events as reminder. They will key in the details and more importantly the time to activate the reminder.
So was think how do i code so when the application is running, it will keep checking on the phone time against the scheduled time.
Tomas Conway
Ranch Hand

Joined: Nov 02, 2004
Posts: 45
Use the Timer and TimerTask classes (in java.util).

You can schedule a task to be run periodically. That task can check the current time against the scheduled time and do whatever is required at the scheduled time.

Alternatively (and probably a better solution) you can schedule your task to be run at the specified time.
[ January 09, 2005: Message edited by: Tomas Conway ]
Michael Yuan
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
ice ice,

Please change your display name to conform to the JavaRanch naming policy, which you had agreed to when you signed up.

Michael (the moderator)

Seam Framework:
I agree. Here's the link:
subject: Check for time
It's not a secret anymore!