2014-03-14 22 views
0

在我的应用我试图发挥使用PlatformRequest的(URL),从SD卡视频播放使用PlatformRequest的(URL)的视频播放器的视频。这是我用来做它的代码 - platformRequest(“file:/// E:/bega.3gp”)。我不知道这是做到这一点的正确方法。路径格式是否正确?请给我一种从我的应用程序播放视频播放器中的视频的方法。如何在J2ME

回答

1

只要确保你正在传递正确的路径。使用下面的代码,您将能够知道哪些是可用的路径。

private String getFullMusicPath() { 
    Enumeration drives = FileSystemRegistry.listRoots(); 
    String root = null; 
    while (drives.hasMoreElements()) { 
     root = (String) drives.nextElement(); 
     if (root.equalsIgnoreCase("sdcard/")) { 
      return "file:///" + root + musicFolder + "/"; 
     } 
    } 
    return (root == null ? null : "file:///" + root + musicFolder + "/"); 
} 
+0

维沙尔嗨。感谢您的答复。我已经验证了我的路线,这是正确的。我发现问题与platformRequest有关。 – prabhu