Tuesday, October 29, 2013

Saving to device

UWS and Grubby Boston use a remote file for data, an XML on a website. According to the Android himself, these are the storage methods apps can utilize:
Shared Preferences - Store private primitive data in key-value pairs.
Internal Storage - Store private data on the device memory.
External Storage - Store public data on the shared external storage.
SQLite Databases - Store structured data in a private database.
Network Connection - Store data on the web with your own network server
The next app to come from Butterfruit Labs will store a user profile on the device directly, as in, Internal Storage. External storage saves space on the device, but takes more battery to download and upload. Since the files for our next undisclosed app will be so small, we go internal. From my research, the only read/write permissions are:

So its not even necessary to add an extra permission to write internally. To do that, just:

fileoutputstream = new FileOutputStream( root + "/" saveFileName );

No comments:

Post a Comment