Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
welsenKiriono
Posts: 202
Registered: ‎04-19-2011
My Device: Blackberry Bold 9780
Accepted Solution

Creating Reminder Application

To all developers,

I'm trying to create reminder application for event, birthday reminder.  Here is my problem :

1. save event

How should i save the event and to check when to fire a reminder to user? Is it using PIM or Todolist?

2. show custom dialog for reminder

 I have learn about PIM for event calender or ToDoList, but the problem is when reminder is fired, it shows dialog from calender or todo task application. I want to show my custom dialog to remind user when reminder is fired. How can i do that?

 

Thank you for your answers

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Creating Reminder Application

if you want a custom dialog you would have to implement your own reminder system, for example with a background application and realtimeclocklistener.

it is easier to integrate with the existing framework, but then you won't have the custom message.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
welsenKiriono
Posts: 202
Registered: ‎04-19-2011
My Device: Blackberry Bold 9780

Re: Creating Reminder Application

Thank you for your reply, sir.

Can you give me more detail about RealTimeClockListener? Do you mean using timerTask to check every minute for reminder date?

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Creating Reminder Application

http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/RealtimeClockListener.h...
add it by calling
http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/Application.html#addRea...

you register it on the system and it is called every minute, so you can check every minute if your event is on. As it is called very often the processing should be inexpensive, of course.

you can set up an alternate entry point to give your application a background process part that would handle the check:
http://supportforums.blackberry.com/t5/Java-Development/Set-up-an-alternate-entry-point-for-an-appli...

When the time has come you could display a global dialog as an alert and open your main application from a confirm button, for example.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
welsenKiriono
Posts: 202
Registered: ‎04-19-2011
My Device: Blackberry Bold 9780

Re: Creating Reminder Application

Thank you for your reply.

Sir, if it is called every minute as long as my app is running, how about the life of battery device?

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Creating Reminder Application

as long as you don't do something expensive (data, gps, heavy processing) there is no impact on battery life.

i guess you just compare a date with the current time, its hard to get more inexpensive than that. and just by existing a background process does not impact the battery in a measurable way.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
welsenKiriono
Posts: 202
Registered: ‎04-19-2011
My Device: Blackberry Bold 9780

Re: Creating Reminder Application

thank you for your explanation.

I will try to code it, sir