tags:

views:

30

answers:

1

Hi ,i am trying to playing music file,using content handler,and this is code syntax i used

//Create invocation

Invocation invocation =
      new Invocation(filePath,null,BlackBerryContentHandler.ID_MEDIA_CONTENT_HANDLER);

    // Get the registry object
       Registry registry = Registry.getRegistry("net.rim.device.api.content.BlackBerryContentHandler");//here i changed to my own file

    //Invoke the content handler.
       registry.invoke(invocation);

When the application runs.it navigates to media application screen,but it just stays out there,and can't play music or media file ,Any ideas what could be problem?

Regards

Rakesh Shankar.P

A: 

I have tried this code and its working fine for me

Invocation invocation = new Invocation("file:///SDCard/B.mp3",
                        null, BlackBerryContentHandler.ID_MEDIA_CONTENT_HANDLER);
Registry.getRegistry(getClass().getName()).invoke(invocation);
Vivart
hi thanks for your input ,i am trying to play a streaming file,your suggestions on it
Rakesh
for streaming start browser with rtsp url.BrowserSession visit = Browser.getDefaultSession(); visit.displayPage("rtsp://stream.the.sk/live/musicbox/musicbox-hm.3gp");
Vivart
hello Vivart,I tried that way also.But i want the Streaming music or videos files to be played via this blackberrycontenthandler.SO i am looking for it.
Rakesh