Search code examples
blackberryjava-meblackberry-jde

Make a notification that will run every day at 9:00 pm


I want to make an auto synchronize in my application that will happen every day at 9:00 pm. I am doing this in the way of :

try { Thread.sleep(24hours); } catch (Exception ex) { }

But the problem is when the user turns off his device before 24 hours, When turning it on the thread will sleep again for 24 hours.

So I am thinking of a way to manage this depending on the clock of the system. When the device has the time of 9:00pm, the application will be alerted and I will do the work.

Is it possible to make this?


Solution

  • You want to schedule your app to run at a particular time. BlackBerry's OS supports this. See Schedule a BlackBerry application