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

New Contributor
Posts: 3
Registered: ‎05-10-2011
My Device: Curve 9300
My Carrier: Claro

Custom Alarm in Blackberry



I don't know that is possible try to custom the alarm in Blackberry. I have this example to show the alarm, but I see the Calendar Icon by default, I´d like to change this icono and show a icon different which is more appropiate to my application. Any Suggestions would be appreciated.

This is my source.

    public void writeTaskCalendar(){
        EventList events = null;
            events = (EventList) PIM.getInstance().openPIMList( PIM.EVENT_LIST,PIM.READ_WRITE );
        } catch( PIMException e ) {}
        Event event = events.createEvent();

            event.addString( Event.SUMMARY, PIMItem.ATTR_NONE, "Nombre del Evento " );
            event.addString( Event.LOCATION , PIMItem.ATTR_NONE, "Locacion" );
            Calendar c = Calendar.getInstance();
            c.set(Calendar.MINUTE , c.get(Calendar.MINUTE) + 6 );
            event.addDate( Event.START, PIMItem.ATTR_NONE, c.getTime().getTime() );
            c.set(Calendar.MINUTE , c.get(Calendar.MINUTE) + 5 );
            event.addDate(Event.END, Event.ATTR_NONE, c.getTime().getTime() );     
            if (events.isSupportedField(Event.ALARM)) {   
                event.addInt(BlackBerryEvent.ALARM, BlackBerryEvent.ATTR_NONE, 180); //3 min = 180
        } catch( Exception e ){}
        }catch( PIMException e ){}
        }catch( PIMException e ){}

I hope that you could help me.








Posts: 10
Registered: ‎08-25-2010
My Device: Not Specified

Re: Custom Alarm in Blackberry

Hi, how are you? can you set a sound for this alarm? Thanks in advance