views:

229

answers:

2

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??

  • Shankar
A: 

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

funkybro
Record store is too little for my need. I need to store files ranging 500kb to 1mb daily. Any alternative security settings possible on folders?
Shankar
+1  A: 

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.

QuickRecipesOnSymbianOS
Thanks for the reply.Well i need to support Sony ericsson, series40 phones as well.Is it supported on those platforms?
Shankar
+1, forgot about "fileconn.dir.private"
funkybro