Helpful Information
 
 
Category: BlackBerry Development
Blackberry implement audio player

Hi,

I am developing an application which let users to hear songs online. And I used Blackberry Player and Manager APIs. My application works fine and I can play songs. Now I wan't to add more controls to it. As an example I want pause, play songs. Mute the sound, Control the volume. Display the progress of the play back. Display the current time position of the song like that. I started research on that. And I tried to do that with PlayerListener. But unfortunately all the time I am getting IllegalStateException. So I can't go ahead with that research.

As a help can someone please tell me how can I implement above kind of controls for a player. Appreciate if someone can post a sample code to do that. Further I will put my playback source code here.


public void run() { try { p = Manager.createPlayer(requestedSong + SystemSettings.strNetwork); p.setLoopCount(1); p.start(); } catch (IOException ioe) { } catch (MediaException me) { } }

public void run()
{
try
{
p = Manager.createPlayer(strSongURL);
p.setLoopCount(1);
p.start();
}
catch (IOException ioe)
{ }
catch (MediaException me)
{ }
}

Thank you very much.

Prasad










privacy (GDPR)