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

BlackBerry® World™ Development

Reply
Highlighted
Developer
Posts: 638
Registered: ‎07-02-2009
My Device: Not Specified

Blackberry Application Calendar

Hi all,

 

I have a requirment to show calendar to the user, and let him to select a date from the display. I tried with invoking the blackberry application calendar. It is invoking, from there how can i retrieve the selected date from that calendar. 

 

Is it better to go for my own calendar??

 

 

Thanks and Regards,

PraveenGoparaju.  

Thanks and Regards,
PraveenGoparaju.
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Blackberry Application Calendar

[ Edited ]

From your application, you can add your own menu item to the Calendar application.

 

When the user clicks on this menu item, the app will send the Calendar object in the "context" object of the run() method of your menu item.

 

See ApplicationMenuItem and ApplicationMenuItemRepository in the API docs.

 

Message Edited by RexDoug on 09-21-2009 06:39 PM
Developer
Posts: 638
Registered: ‎07-02-2009
My Device: Not Specified

Re: Blackberry Application Calendar

[ Edited ]

Hi RexDoug,

 

 

Thanks for your reply, according to my requirement i need to provide this option on the screen itself. not in the menu item. when user clicks on this option the calendar should come. with the following piece of code i am able to invoke the calendar of the blackberry.

 

Actually it is showing alll the appointments data and other features, is it possible for me to restrict to the calendar alone??

 

how can i recognise that a particular date is selected by the user thats the present challange before me.

 

I think using blackberry calendar is far far better than designing my own calendar, so please telll me how can i recognise that selected date and use it in my app. for this what are the classes i need to use..??

 

Any samples on the jde or blackberry forums or KB articles regarding this?? Any help should be very very thankful.

 

 

public class TestCalendar extends MainScreen implements FieldChangeListener { ButtonField btn; CalendarArguments calendar; TestCalendar() { btn = new ButtonField("Calendar"); add(btn); btn.setChangeListener(this); calendar = new CalendarArguments(); } public void fieldChanged(Field arg0, int arg1) { Invoke.invokeApplication(Invoke.APP_TYPE_CALENDAR, calendar); } }

 

 

 

 

 

Thanks and Regards,

PraveenGoparaju.

Message Edited by Blanc on 09-22-2009 02:39 AM
Thanks and Regards,
PraveenGoparaju.
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Blackberry Application Calendar

You have limited choices:

 

1. Use ApplicationMenuItem and ApplicationMenuItemRepository as suggested above

 

2. Write your own application to manage the calendar data. The data for the calendar is stored in the PIM database. See BlackberryEvent in the API docs.

 

And, BTW, this thread should be moved to the Java developers forum. This forum is more specific to App World issues.