0
votes

I have created a BlackBerry application,
HelloBlackBerry extends UiApplication and it renders the fields and
screen layout stuff. And I have a class called Notification and it does some notifications.
What I wanted to do is call that Notification class every 1 hour. Like schedule. But how can I do that, I tried schedule api but no luck,
if anybody can give me a hand,
thanks

1
Do you want to run your application once per hour, or assuming it's running run a method in Notification once per hour? - Richard
I just want to run the Notification class once per hour, so it does a random notification every hour... - Eric

1 Answers

2
votes

I would recommend that you implement RealtimeClockListener in your Notification class. Register the listener with Application.addRealtimeClockListener(). In clockUpdated test the time to see if the hour has passed and if so run your notification.