Programmatically invoke the default media player in Blackberry?

As I said, the application should call the Blackberry media player by default. Does anyone know or can point in the direction of its implementation.

Enviroment: Eclipse + BB 4.5 Plugin

+3
source share
1 answer

There are two ways to do this.

The first approach is to use the device content handler mechanisms. You will essentially force the device to process the specified file by default. For audio files, by default, the media player will be launched on the device with the file.

, , song.mp3 SD- , - ( , ):

Invocation invocation = new Invocation("file:///SDCard/BlackBerry/music/song.mp3"); 
Registry reg = Registry.getRegistry("net.rim.device.api.content.BlackBerryContentHandler");
reg.invoke(invocation);

, - BlackBerry, , . , net.rim.blackberry.api.browser.BrowserSession, URL- . URL- - , , , ://location . , .

+4

Source: https://habr.com/ru/post/1713032/


All Articles