与MIDlet.platformRequest打开文件() [英] Open file with MIDlet.platformRequest()
问题描述
是否有可能得到一个设备打开磁盘上的文件中使用 MIDlet.platformRequest(字符串URL)
的方法?我希望能使用以下命令:
Is it possible to get a device to open a file on disk using the MIDlet.platformRequest(String url)
method? I was hoping to use the following:
midlet.platformRequest("file:///path/to/file/file.png");
但是,这只是抛出一个 ConnectionNotFoun
D例外。我专门用黑莓平台,但我的不有机会获得专属黑莓的API。文件可以是任何类型的,所以很明显我不期待它来处理每一个。
But this just throws a ConnectionNotFoun
d exception. I'm specifically using the BlackBerry platform, but I do not have access to the proprietary BlackBerry API. File could be of any type, so obviously I'm not expecting it to handle every one.
干杯
推荐答案
没有,这是不可能使用平台的要求打开任意文件。 MIDP 2.0的设备需要支持平台的要求仅适用于网址和联系电话:联系。所有其他方案都是可选的,依赖于设备。
No, it is not possible to open arbitrary files using platform request. MIDP 2.0 requires devices to support platform request only for URL and tel: connections. All other schemes are optional and device dependent.
诺基亚S60手机似乎支持文件://为<一指出, href=\"http://www.forum.nokia.com/document/Java_ME_Developers_Library/?content=GUID-EBB4BC93-74A5-48E6-88BD-A9164079DD9F.html\"相对=nofollow>诺基亚论坛。但是,你需要确认其他平台,包括黑莓。
Nokia S60 phones seems to support file:// as pointed out in forum Nokia. But you need to verify for other platforms including Blackberry.
您可以看一下 JSR211内容处理器API 作为替代。我相信在新的黑莓设备的支持。
You can look at JSR211 Content Handler API as an alternative. I believe it is supported in newer Blackberry devices.
这篇关于与MIDlet.platformRequest打开文件()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!