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
New Developer
Posts: 15
Registered: ‎07-20-2009
My Device: Not Specified
Accepted Solution

security exception while playing preloaded sound file on 8900

hi all,

 

I am working on a project and needs to play preloaded sound files on 8900. i have tried it with real device, it is throwing a security exception while creating media player. I have installed the signed demo application on device and again change the application permissions from 'Custom' to 'Allow'. But the problem persist.

 

 i am using JDE 4.6 for development.

BB 8900 v 4.6 device for testing and

Signing IDs are: RRT, RBB, RCR.

 

Attaching the applicatin code where the exception is occuring:

try{ Player player = Manager.createPlayer("file:///store/samples/ringtones/Alarm_HighAlert.mid"); player.addPlayerListener(HelloWorldDemo.theApp); player.prefetch(); player.realize(); player.start(); }catch (MediaException x) { Dialog.alert("media exception in creating player"+x); } catch (IOException ix) { Dialog.alert("io exception..."+ix); } catch (SecurityException sx) { Dialog.alert("security exception..."+sx); } catch (IllegalArgumentException ax) { Dialog.alert("Illigal Argument exception..."+ax); }

 

exception thrown in dialog : security exception...net.rim.device.api.system.ConrolledAccessException 

 

I have test the same code on BB Storm, created build with JDE 4.7 and it is working fine. BB storm has .m4a audio files in it's preloaded directory, while BB 8900 has both .mid and .m4a files (both file types throwing the same security exception).

 

plz anybody has some suggestion, i will be very thankful.

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

Re: security exception while playing preloaded sound file on 8900

Is it able to play on Simulator?

 

Have you tried placing the some other file. 


Use Search. "Accept Solution" If the problem is resolved.
New Developer
Posts: 15
Registered: ‎07-20-2009
My Device: Not Specified

Re: security exception while playing preloaded sound file on 8900

Thanks for reply, It is working fine on simulator. i have test the demo on BB Bold too, it is working fine.

 i can't find what is the problem with BB 8900.

 

as you said i've tried with other files too, not worked.

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

Re: security exception while playing preloaded sound file on 8900

The exception you are seeing is expected.  Third party applications are not able to play the sample sound files included with a BlackBerry smartphone.

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
Highlighted
New Developer
Posts: 15
Registered: ‎07-20-2009
My Device: Not Specified

Re: security exception while playing preloaded sound file on 8900

MSohm, thanks for reply,

 

Plz note, i am able to play preloaded tones in my application on BB Storm and BB Bold.

is that, BB 8900 has more security for preloaded media files???