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: 35
Registered: ‎12-12-2008
My Device: Not Specified

ControlledAccessException when calling BlackBerryPIM.createPIMList

I am calling BlackBerryPIM.createPIMList() in the simulator and it works fine, but on device I get a ControlledAccessException. I have requested every relevant permission I can think of (in particular PERMISSION_ORGANIZER_DATA), and have tried manually setting all app permissions to Allow.  My apps are signed, and I have no problems reading and setting listeners on the PIM lists, and writing individual contacts to existing pim lists.


Sample code:

 

  BlackBerryPIM pim = (BlackBerryPIM) PIM.getInstance();
  long listId = pim.createPIMList(PIM.CONTACT_LIST, "Whatever");

 

I am trying this with OS 6.0 only.

 

Am I supposed to be able to do this? Clearly the docs say yes, but I can't find any samples or even support forum questions about this API (createPIMList).

 

New Developer
Posts: 16
Registered: ‎02-06-2009
My Device: Not Specified

Re: ControlledAccessException when calling BlackBerryPIM.createPIMList

I encountered exactly the same problem, very frustrated.

I followed the sample code here:
http://docs.blackberry.com/en/developers/deliverables/17953/Create_contact_list_1197457_11.jsp