问题
I am a iphone/android developer, and now trying hands on Blackberry.
Need guidance in streaming radio url in blackberry.
need some resources , links to play radio streaming in blackberry.
Appreciate it.
回答1:
I think the link will help you,there is a sample zip file also http://supportforums.blackberry.com/t5/Java-Development/Streaming-media-Start-to-finish/ta-p/488255
And if you get a url you can directly give the url to Player object,Blackberry support almost all type of media files.
private void invokeMediaPlayer(String url){
try {
player = javax.microedition.media.Manager.createPlayer(url);
player.realize();
volume = (VolumeControl)player.getControl("VolumeControl");
volume.setLevel(40);
player.prefetch();
player.start();
player.addPlayerListener(this);
/* metaDataTrimmed = inner.getMetaData1();
System.out.println(metaDataTrimmed);*/
} catch (IOException e) {
e.printStackTrace();
} catch (MediaException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
来源:https://stackoverflow.com/questions/5577795/radio-streaming-in-blackberry