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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


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,884
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.
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???