File 黑莓文件调用

File 黑莓文件调用,file,blackberry,invocation,File,Blackberry,Invocation,为什么这在设备上不起作用,但在bb模拟器上起作用。 你有什么建议让它在设备上工作吗 Invocation invocation = new Invocation("file:///SDCard/BlackBerry/music/song.mp3"); Registry reg = Registry.getRegistry("net.rim.device.api.content.BlackBerryContentHandler"); reg.invoke(invocation)

为什么这在设备上不起作用,但在bb模拟器上起作用。 你有什么建议让它在设备上工作吗

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

我不是通过注册内容处理程序而是通过注册应用程序包找到了解决方案。 就我而言:

Registry _registry=Registry.getRegistry("myapp.mobile.app");

您在评估问题时是否有任何错误?通常错误可以提供线索。@Arhimed没有错误没有引发异常只是没有执行任何操作。。。非常抱歉,在这种情况下我无能为力。@Arhimed谢谢你的时间太好了!我使用Registry.getRegistry(Application.getApplication().getClass().getName()),它可以正常工作。谢谢!