Android memory: That’s the question.
The Nexus 4 specifications list the following MEMORY:
2 GB RAM
8 GB internal storage (actual formatted capacity will be less)
(Note: no SD card is listed)
The Nexus 7 (Android tablet) specifications list the following MEMORY:
1 GB RAM
8, 16, or 32 GB flash memory
(Note: no SD card is listed)
The Samsung S III (Android Phone) specifications list the following Memory:
1 GB RAM (international version)
2 GB RAM (selected markets)
Storage 16 or 32 GB flash memory
Up to 64 GB SD card (microSDXC)
The phone shows all the memory as if it were one partition and says it has 11.35 GB total. The internal memory and application storage are one partition and the rest of the memory (approximately 4 GB) is used for the preinstalled system apps and Android OS.
Android devices are very similar to PC’s, they consist of a BIOS (Basic Input Output System), an OS (Operating System) and then Applications and Data.
The BIOS would be stored in EEPROM (Electrically Erasable Programmable Read Only Memory), or rather a sub-type called Flash Memory. Flash memory is an electronic (i.e. no moving parts) non-volatile computer storage device that can be electrically erased and reprogrammed.
When the BIOS loads the OS then it is moved into RAM Memory. RAM memory stores all currently running applications (including the OS).
The Operating System software, and application software are stored in storage; which is usually an internal SD card, or SD card like storage.
You can have additional storage, such as an external SD card.
So you would have:
EEPROM (Flash Memory)
RAM (System Memory) – The RAM is not “subdivided” on any sort of permanent basis. RAM is used by running processes on an as-needed basis. The biggest thing for SDK apps to note is that there is an upper bound as to how much RAM a process can consume –on your Hero, it should be 16MB.
The “Internal phone storage” refers to the portion of on-board flash space set aside for APK files, databases, preferences, and other local files.
SD Card (Storage) – Your “SD card” is more generically referred to in Android as external storage, which on many devices is some form of SD card, though it could actually be just another partition of the on-board flash storage designated as serving in the role of external storage.
Beginning with API Level 8, you can allow your application to be installed on the external storage (for example, the device’s SD card). This is an optional feature you can declare for your application with the android:installLocation manifest attribute. If you do not declare this attribute, your application will be installed on the internal storage only and it cannot be moved to the external storage.
Is it possible to use SD card as RAM in Android devices?
Apparently the answer is No, but if you “root” your device then:
“If you have ever used Linux OS then you must be aware of the term SWAP. In every Linux OS we create a partition called SWAP. This SWAP partition does the same work that is done by external memory as ram in windows &. And Android OS is also based on Linux kernel. You can also create a swap partition of SD card. But you have to root your device to get benefit of these apps. To do so i will recommend these following apps:
1. SWAPit RAM Expander : You can expand your virtual memory up to 2.5 GB by using this app.
2. Swappper2application : This app also helps creating a swap partition of SD card.
There are also many apps which do the same. PS: THese apps may degrade your SD card life.”
Data Storage Options – Android provides several options for you to save persistent application data. The solution you choose depends on your specific needs, such as whether the data should be private to your application or accessible to other applications (and the user) and how much space your data requires.
Your data storage options are the following:
- 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.
Android provides a way for you to expose even your private data to other applications — with a content provider. A content provider is an optional component that exposes read/write access to your application data, subject to whatever restrictions you want to impose.
Using Shared Preferences – The Shared Preferences class provides a general framework that allows you to save and retrieve persistent key-value pairs of primitive data types. You can use Shared Preferences to save any primitive data: booleans, floats, ints, longs, and strings. This data will persist across user sessions (even if your application is killed).
Where is it stored? It’s stored on “LocalStorage”. LocalStorage is a type of storage. For Android the Buzztouch config file is contained in the apk and is called BT_config.txt. The apk is loaded onto the device and stored on the app’s internal memory. If the app allows use of the SD card it will be stored on the SD card if available.
If the app has a data URL in the config file (aka a “Online” Buzztouch app vs “Offline” Buzztouch app) it’ll connect with the server hosting the Control Panel and download the config data hosted on the Control Panel. Where is this data saved? You guessed it, in LocalStorage.
Wait you ask, “Isn’t LocalStorage internal to the device, because there’s no external device connected to it, and the “updated” config file works Offline, so it not in the Cloud?”
That’s correct “LocalStorage” is internal to the device, but the user doesn’t have access to LocalStorage. The user cannot (directly) save a file to LocalStorage. An app can access the LocalStorage it it’s programming allows it, but the use will have not direct access.
Cloud Storage (Coming up next)