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

Posts: 17
Registered: ‎04-16-2011
My Device: 7100T
My Carrier: BB

Implementation of alarm code



I want to implement alarm on my project. I have search a lot of but didn't get any solution.


Please help me Its urgent.


Thanks in advance

Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Implementation of alarm code

Not sure this is a question we can answer.  I think we need more information to help you with this, including answers to questions like:

1) What sort of alarm: timer, count down timer, personal attack or what?  Putting this another way - what will trigger it? 

2) What happens when the alarm is triggered?

3) How do you control the alarm, say to turn the alarm on and off?


So we explain in the best possible way, we also need to have some understanding of what you know.  So please can you also tell us what have you tried and what results you got?


I am not aware of a piece of open source software that does what you want either, so you will have to put together pieces of code yourself.  So it is probably better if you try to break up this project into parts and attack each part at a time.  This will mean you ask more specific questions which are easier to answer too. 

Posts: 17
Registered: ‎04-16-2011
My Device: 7100T
My Carrier: BB

Re: Implementation of alarm code

I want to put the alarm triggered for 1day, 2 day etc.


such as I have set alarm for 1 day and I am opening that class in which implement the alarm, that class should be show popup (your 1 day is completed).

New Contributor
Posts: 3
Registered: ‎05-28-2012
My Device: Torch, Curve, Bold
My Carrier: Telcel

Re: Implementation of alarm code

I'm interested too on any help about this topic. I there is 2 ways to do it. The first and the easier is register an event on the Calendar and put it an alarm, by this code:


PIM pim = PIM.getInstance();
EventList events;
events = (EventList) pim.openPIMList(PIM.EVENT_LIST,
Event event = events.createEvent();
event.addString(Event.SUMMARY, PIMItem.ATTR_NONE, "Event test");
event.addDate(Event.START, PIMItem.ATTR_NONE, cal.getTime().getTime());
event.addDate(Event.END, PIMItem.ATTR_NONE, cal.getTime().getTime()+60000);
event.addInt(Event.ALARM, PIMItem.ATTR_NONE, 1);


But i thing there is another way, because i have seen it in other apps that the "Alarm Event" doesn't register in Caledar... is like they build their own way to trigger a popup insetead using the native... and the cuestion is:

Is something like that i describe before?
There is a Class in the app that help us registering an "Alarm Event" NOT a "Calendar Event"?

Is there life on other planets?


jejeje, chears!