如何用J2ME代码读取SD卡?
String initDir = System.getProperty("fileconn.dir.photos");
当我按照上面的方式使用它时,我只是读取手机内存中的目录图像。如何读取SDCard上的图像文件?
我曾经尝试过以下一些方法,但无法读取SDCard:
String initDir = System.getProperty("file:///SDCard/");
String initDir = System.getProperty("file:////");
还有其他方法可以读取SD卡详细信息吗?
String initDir = System.getProperty("fileconn.dir.photos");
when i use it the way above, I just read the directory images in phone memory. How that can read image files contained on the SDCard?
some ways I have ever tried as follows but can't to read SDCard:
String initDir = System.getProperty("file:///SDCard/");
String initDir = System.getProperty("file:////");
Is there any other way to read SD Card Details ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
解决方案在于FileConnection可选包,该包支持基于J2ME的应用程序创建、读取和写入位于移动设备和外部存储卡上的文件和目录。有关如何执行此操作的更多信息,请参阅给定的链接。
The solution lies in the FileConnection Optional Package, this package enables J2ME-based applications to create, read, and write files and directories located on mobile devices and external memory cards. More about how to do this is available from the given link.
您可以尝试读为
E: ,SDCard 在诺基亚手机中形成为
E: ,而
C:
是手机内存。You can try to read as
E:
, SDCard is formed asE:
in Nokia Mobile, whileC:
is phone memory.