views:

283

answers:

2

My program saves a file on the device during runtime and reads/writes data from it during runtime. Currently it gets saved in the SDCard. I want to know if saving it in device flash memory would be better than removable media. Does device allows us to write something in its internal memory? Suggestions/Ideas? Thanks

+1  A: 

Support for an on-device file system is OS dependent. Most of the pre-3G devices don't have much internal memory anyway. If the amount of data is small (a few hundred kB) the best way is the PersistentStore. If it is larger than that, and you want to support the widest number of models then the SDCard is the way to go.

Richard
+2  A: 

We check, if there's an SDCard available we store there:


if (((FileConnection) Connector.open("file:///SDCard/", Connector.READ_WRITE)).exists())
    return "file:///SDCard";
else
    return "file:///store/home/user";

EDIT: See more information on different locations here

Tamar