J2ME私有文件夹(仅我的midlet可以访问)

发布于 2024-09-01 01:18:32 字数 190 浏览 2 评论 0原文

我有两个 midlet,其中一个每天都会从服务器下载一些文件 另一个使用这些文件。如果我将文件下载到普通文件夹,移动用户可以手动删除该文件夹或文件。所以我需要一个隐藏的私人文件夹,只有我的 midlet 可以访问。我听说symbian平台为每个应用程序提供了用户无法访问的私人文件夹。

我的 j2me 应用程序需要这样的文件夹。如何创建这样的文件夹?

I have two midlets, one will download some files form server everyday
and the other uses these files. If i download the files to a normal folder the mobile user may delete the folder or files manually. So i need a private folder which is hidden and only accessible for my midlets. I heard about private folders which symbian platform provides for each application which are not accessible to users.

I need such a folder for my j2me app. How to create such folder ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

未央 2024-09-08 01:18:32

您的 2 个 MIDlet 是否打包到同一个 MIDlet Suite 中?

如果是的话,这也许是可能的。

您无法创建 MIDlet“私有数据笼”(即私有文件夹),但 midp 运行时应该自动为您创建一个。仅当您的 MIDlet 已签名时,才有可能发生这种情况。

您可以使用“fileconn.dir.private”系统属性来查找私有数据笼根。

您应该能够在它指向的位置创建子文件夹。

不过,根据 Symbian 安全模型,不存在完全私有的文件夹。您的 MIDlet 专用数据笼只能由您的手机制造商信任的应用程序访问(主要是手机固件中的任何应用程序,但可以稍后安装新的应用程序)。

编辑:

索尼爱立信 JP8 平台支持 MIDlet 私有数据笼,但我不知道它是否是单个 MIDlet 套件内所有 MIDlet 的共享位置。

诺基亚的 Java 开发人员库表示 Series40 不支持“fileconn.dir.private”。

Are your 2 MIDlets packaged into the same MIDlet Suite?

It may be possible if they are.

You can't create a MIDlet "private data cage" (i.e. a private folder) but the midp runtime is supposed to create one for you automatically. It's possible this only happens if your MIDlet is signed.

You can use the "fileconn.dir.private" System property to find the private data cage root.

You should be able to create sub-folders at the location it points to.

According to the Symbian security model, though, there is no such thing as a totally private folder. You MIDlet private data cage will only be accessible to applications trusted by your handset manufacturer (mostly whatever applications are in the handset firmware but new ones could be installed later).

Edit:

Sony Ericsson JP8 platform supports MIDlet private data cage but I don't know whether it is a shared location for all MIDlets inside a single MIDlet Suite.

Nokia's Java Developer Library says "fileconn.dir.private" is not supported on Series40.

忆悲凉 2024-09-08 01:18:32

使用文件系统是不可能的,但是您可以使用 使用 AUTHMODE_ANY 权限创建的 RecordStore

Not possible using the filesystem, however you could share data between MIDlets using a RecordStore created with permission AUTHMODE_ANY.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文