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
Developer
Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm
My Carrier: Verizon,AT&T

Cannot programatically play audio files in storm

[ Edited ]

Hello all

 

I have written a code to play an audio file placed on a server.

The code works well for non touch device but not for touch device

Can anybody suggest what should i do?

 

 

 

PlayerThread  _playerThread = new PlayerThread();
_playerThread.start();

 

private class PlayerThread extends Thread
{
public void run()
{
try
{
String imgPath = url;
imgPath=imgPath + ";deviceside=true" + HttpRequestHelper.getConnectionparameter();

player = javax.microedition.media.Manager.createPlayer(imgPath);
playerListener = new MediaPlayerListener();
player.addPlayerListener(playerListener);
player.start();
LoginScreen.volumeControl = (VolumeControl) player.getControl("VolumeControl");
}
catch (final Exception e)
{
System.out.println("******Exception caught :" + e);
edit: got this exception,dont knw y coz my not using file system
net.rim.device.api.io.file.FileIOException: File system error }
}
}

 

private class MediaPlayerListener implements PlayerListener
 {
public void playerUpdate(Player player,String event,Object eventData)   
{
  if(event == STARTED){}
  else if(event == ERROR){}
  else if(event==END_OF_MEDIA){}
}
}

did some coding related to my app in this part
                        

 

need help !!!!!!!!!!!

 

Developer
Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm
My Carrier: Verizon,AT&T

Re: Cannot programatically play audio files in storm

Any help is highly appreciated

 

plz can anyone suggest me what should i do.

I have also tried with buffering and downloading a file and saving it in memory card and playing it again.

 

but the file does not play in any case

Highlighted
Developer
Posts: 950
Registered: ‎06-22-2010
My Device: 9550

Re: Cannot programatically play audio files in storm

Hi swati, I directly passed the Http Url of Audio file in the Player class and It works for me.

 

What are you getting.

Developer
Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm
My Carrier: Verizon,AT&T

Re: Cannot programatically play audio files in storm

Hey Nitin thanks fr the reply.

 

I have also tried that also but still no audio.

i can see it bufferring from the arrow at top right corner.

but no audio.

 

can u share your code if possible

may be m doing some stupid mistake.

Developer
Posts: 950
Registered: ‎06-22-2010
My Device: 9550

Re: Cannot programatically play audio files in storm

Give me your email id.

------------------------------------------------------------------------------------
Press Kudo to say thank to developer.
Also Press the Accept as solution Button when u got the Solution.