Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android internal storage - what are the limits?

1) Our Android app will store data in a built-in SQLite DB.

I see the DB can throw android.database.sqlite.SQLiteFullException, but there's no exact info in API what is the limit.

Could anyone tell what are the size limits for a DB in order not to get into the SQLiteFullException?

I assume DB will store data in device's internal storage (versus SDCard). Am I right? Given SQLite DB is just a file, probably the DB size is limited with free internal storage space. Again - Am I right? If yes, then what is the internal storage size on Android? How to detect it? Does it vary on a device model basis or OS version basis?


2) We'll also need to save app settings. I think SharedPreferences will fit nicely. However the question is - are SharedPreferences saved to the internal storage too? If yes, then is it the same storage where the DB stores its file?

Thanks in advance!

like image 926
Vit Khudenko Avatar asked Jan 12 '10 22:01

Vit Khudenko


People also ask

What takes up most of internal storage on Android?

Photos and videos can be some of the most space-hogging items on your phone.

What happens when Android storage is full?

You Can't Download the Apps You Want You've decided you really want a new app, but when you try to download it, Android tells you that you have “Insufficient Storage Available.” If you want to download the app, you'll have to get rid of apps or phone files to make room for it.

What is Android internal storage?

Android Internal storage is the storage of the private data on the device memory. By default, saving and loading files to the internal storage are private to the application and other applications will not have access to these files.

What is the max amount of gb for a phone?

128GB (probably the most common, and sometimes lowest option available on the newest releases) 256GB. 512GB (the highest capacity sold on smartphones)


1 Answers

I assume DB will store data in device's internal storage (versus SDCard). Am I right?

By default, yes.

Given SQLite DB is just a file, probably the DB size is limited with free internal storage space. Again - Am I right?

That would be my guess.

Does it vary on a device model basis or OS version basis?

On a device model basis.

are SharedPreferences saved to the internal storage too?

Yes.

If yes, then is it the same storage where the DB stores its file?

Yes.

like image 123
CommonsWare Avatar answered Sep 22 '22 14:09

CommonsWare