11-14-2011 05:02 AM
I am developing a BB WebWorks application that both creates and downloads existing files that may contain secure information. I need somewhere to save these files that is specific to the application and secure.
I was hoping that I could use "local:///myfile.ext" as a file path and save documents away to an area that's specific to the application but having tried this doesn't seem possible.
Can anyone give me some advise regarding what is and what isn't possible? Perhaps saving to the SD Card and having the files visible to everything/one is the only option?
Thanks in advance.
11-14-2011 08:38 AM
From the mention of the SD Card I'm assuming you mean on the Smartphone and not PlayBook correct?
The Smartphone does not have sandboxed folders that you can apply application permissons to. So there isn't an area where you can set files aside that can only be accessed by your application.
You can store data in a SQLite database that is encypted and can only be accessed by your application.
11-14-2011 09:01 AM
Are there any sort of guidelines for reacting to a BB device which doesn't have a SD Card, (in-fact is there even any way to detect if the user has an SD card and what space is left in WebWorks?)
11-14-2011 09:04 AM
You can use the getFreeSpaceForRoot() function call to find out how much space is left on the SD card or the device memory for storage
11-14-2011 12:04 PM
Thanks again for your reply, I'll check out that method.
11-14-2011 12:32 PM
This is a BlackBerry Smartphone OS limitation. No different in Java.
What some developers have done in Java is used encryption to encrypt the files on the file system. However, if you do this you won't be able to rely on the built in apps on the device to display the contents of the files.
11-15-2011 10:00 AM
Thanks for your reply,
I am already performing encryption but this doesn't happen until after I've recorded from the microphone (using blackberry.media.microphone). If something happens during the recording and the encryption then the audio file is available for all and sundry to access.
I guess this is just a limitation of the BlackBerry and I will have to make users aware.
Thanks again for your help.