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: 41
Registered: ‎09-11-2009
My Device: Not Specified

ControlledAccess Exception while playing stock audio files

The application I'm working on plays a notification sound whenever certain events happen. I have it so the user can use a default sound file I've included in my project, or they can select an audio file on the device (phone memory or SD card). Everything works fine, but if the user selects one of the stock ringtones/notification sound files that came preloaded with the phone, I get a ControlledAccess Exception. I've tried changing the permissions of my program (in Options>Applications) and setting everything to "Allowed", but that didn't work.


Is there a way I can get permission to play these files or is it just not possible since they are protected/owned by RIM?

BlackBerry Development Advisor
Posts: 15,766
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: ControlledAccess Exception while playing stock audio files

This is the expected behaviour.  Third party applications can not programmatically access the sample files bundled with the BlackBerry Device Software.


However, you can allow a user to choose from them if you make use of the Notification API and integrate your application with the device profile.


Notifications Made Easy


Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker