Click here to Skip to main content
15,890,717 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Java
try 
{
    Player p = javax.microedition.media.Manager.createPlayer("abc.mp3");
    p.realize();
    VolumeControl volume = (VolumeControl)p.getControl("VolumeControl");
    volume.setLevel(30);
    p.prefetch();
    p.start();

}
catch(MediaException me)
{
    Dialog.alert(me.toString());
}
catch(IOException ioe)
{
    Dialog.alert(ioe.toString());
}


I used above code to play an audio in blackberry. But it gives an exception error as mentioned in below.

javax.microedition.media.Media Exception
Posted
Comments
Sandeep Mewara 6-Aug-12 14:32pm    
Incomplete. Posting complete exception with stack trace would help.
Jeremy Shin Woo 6-Aug-12 14:39pm    
javax.microedition.media.Media Exception.
this is the exception message shown in the alert.

1 solution

You can't open a question on every single issue you find in your programming (...not to talk about development...).

PLEASE buy a book. And try to learn basic Java before you turn into Blackberry development.

And please do not think you'll learn everything on the internet - You can not. Because the web demands for keywords that you do not have. A book does not need keywords. Big advantage!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900