07-21-2009 07:56 AM
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/ringto
nes/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.ConrolledAcc
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.
Solved! Go to Solution.
07-21-2009 08:53 AM
Is it able to play on Simulator?
Have you tried placing the some other file.
07-21-2009 09:52 AM
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.
07-23-2009 04:27 PM
The exception you are seeing is expected. Third party applications are not able to play the sample sound files included with a BlackBerry smartphone.
07-24-2009 02:55 AM
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???