J2ME private folder(only accessible to my midlet)
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 manu开发者_如何转开发ally. 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 ?
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.
Not possible using the filesystem, however you could share data between MIDlets using a RecordStore created with permission AUTHMODE_ANY.
精彩评论