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
Posts: 1,531
Registered: ‎07-14-2008
My Device: Z10
Accepted Solution

Set Calendar appt to Private

I have created a new appt in the Calendar.

 

Is there a method to set it private?  i do not see a flag in the doc.

 

thx

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Set Calendar appt to Private

Private meaning not visible outside of application. I dn't think we can make it private. what is the feature or use you looking for by making private.

 

Please write back if I havn't understood it correctly.


Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 1,531
Registered: ‎07-14-2008
My Device: Z10

Re: Set Calendar appt to Private

well if i sync my calendar and publish it on google then i dont what people viewing my private appts.

 

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Set Calendar appt to Private

Is this feature avaialble on Default BB appointment app.

Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 1,531
Registered: ‎07-14-2008
My Device: Z10

Re: Set Calendar appt to Private

Yes.  if you edit an appt then you can manually set it to Private.

 

Developer
Posts: 30
Registered: ‎05-07-2009
My Device: Not Specified

Re: Set Calendar appt to Private

If you use the JSR75 PIM API to edit an Event you can set its CLASS field to CLASS_PRIVATE.  Is that what you want?

 

import javax.microedition.pim.*; public static void setEventPrivate(Event event) { if (event.countValues(Event.CLASS) > 0) { event.setInt(Event.CLASS, 0, PIMItem.ATTR_NONE, Event.CLASS_PRIVATE); } else { event.addInt(Event.CLASS, PIMItem.ATTR_NONE, Event.CLASS_PRIVATE); } }

 

Developer
Posts: 1,531
Registered: ‎07-14-2008
My Device: Z10

Re: Set Calendar appt to Private

thanks! exactly what i was looking for.
Developer
Posts: 1,531
Registered: ‎07-14-2008
My Device: Z10

Re: Set Calendar appt to Private

have another question for you.

 

I've looked all over the api doc and cant figure out how to set the  "show time as" status in the appt.

i want to set the default to "Busy"

 

thx

Developer
Posts: 30
Registered: ‎05-07-2009
My Device: Not Specified

Re: Set Calendar appt to Private

You can set the "Show Time As" field in almost the same way as the "private" field.  Except you have to use the RIM extensions to the JSR75 PIM API, which are located in the net.rim.blackberry.api.pdap package.  The field BlackBerryEvent.FREE_BUSY is an INT field that stores this value, and you want to set it to BlackBerryEvent.FB_BUSY.  The code below demonstrates

 

 

import javax.microedition.pim.Event;
import javax.microedition.pim.PIMItem;
import net.rim.blackberry.api.pdap.BlackBerryEvent;

public static void setEventBusy(Event event) {
if (event.countValues(BlackBerryEvent.FREE_BUSY) > 0) {
event.setInt(BlackBerryEvent.FREE_BUSY, 0, PIMItem.ATTR_NONE, BlackBerryEvent.FB_BUSY);
} else {
event.addInt(BlackBerryEvent.FREE_BUSY, PIMItem.ATTR_NONE, BlackBerryEvent.FB_BUSY);
}
}