怀疑blackberrycontentHandler

时间:2010-06-22 08:03:24

标签: blackberry

我正在尝试播放音乐文件,使用内容处理程序,这是我使用的代码语法

//创建调用

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);

当应用程序运行时。导航到媒体应用程序屏幕,但它只是停留在那里,无法播放音乐或媒体文件,任何想法可能有什么问题?

此致

Rakesh Shankar.P

1 个答案:

答案 0 :(得分:0)

我已经尝试过这段代码,它对我来说很好用

Invocation invocation = new Invocation("file:///SDCard/B.mp3",
                        null, BlackBerryContentHandler.ID_MEDIA_CONTENT_HANDLER);
Registry.getRegistry(getClass().getName()).invoke(invocation);
相关问题