Like I said, the application has to call the default Blackberry media player.Does anybody know or maybe point in a direction to implement it
Enviroment : Eclipse+BB plugin 4.5
Like I said, the application has to call the default Blackberry media player.Does anybody know or maybe point in a direction to implement it
Enviroment : Eclipse+BB plugin 4.5
There are two ways to do this.
The first approach would be to use the content handler mechanisms of the device. You'll essentially be forcing the device to deal with a given file in a default manner. For audio files, the default manner would be to launch the media player on the device with the file.
So, for example if you have a file called song.mp3 on the SD card on the device, you would do something like the following (code is from memory, haven't checked it in a while):
Invocation invocation = new Invocation("file:///SDCard/BlackBerry/music/song.mp3");
Registry reg = Registry.getRegistry("net.rim.device.api.content.BlackBerryContentHandler");
reg.invoke(invocation);
The second approach would be to use the content handler in the BlackBerry web browser to, essentially, accomplish the same thing. In the case of a browser, you can use the standard classes related to net.rim.blackberry.api.browser.BrowserSession to launch an instance of a browser with the URL to the music file. The URL can be something on the web, or, as above, it can be a file:// location on the device itself. This will cause the browser to deal with the content, which will essentially launch the music player and play the file.
First option will not only on Simulators and not device. So don't go for that...