This is a blog for those who are new to mobile development field . But now its under construction . All mobile development on one Blog.
Monday, January 7, 2013
Sunday, January 6, 2013
Play Voice Notes in Blackberry App
String file_name ;//name of file or path of voice note to play
try
{
FileConnection con = (FileConnection)Connector.open(file_name , Connector.READ);
InputStream is = con.openInputStream();//create an instance of the player from the //InputStream
Player player = javax.microedition.media.Manager.createPlayer
(is, "audio/amr");
player.realize();
player.prefetch();
//start the player
player.start();
}
catch(MediaException me)
{
System.out.println("Audio Play Start" + me.toString());
}
catch(IOException ioe)
{
System.out.println( "Audio Play Start " + ioe.toString());
}
Subscribe to:
Comments (Atom)