Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android App MAX Data Storage(Internal Memory) Capacity Definition and file Visibility Gallery/3rd party apps

If i have 32 Gb inbuilt storage device then my app can store data of ~25 GB to its internal memory(data/data/package_name/) hidden from outside world. Assuming 6 GB for system data.

Min capacity is discussed here.

As per my experiment on nexus 5 my app can write(Image files) till ~25 gb plus to internal memory.Insane image attached.

Just want to know the MAX data capacity,if android has one.?


Does this holds good for other devices as well? or is it OEM proprietary Definition?.

File usage: Root directory: data/data/com.exmaple.ui/ If the file is not private then Videos/PDF files stored can be played/viewed using other apps like Photos/Adobe Using Intents.

But making MODE_WORLD_READABLE they are not shown in native gallery.How do i make them show in native gallery or file explorer?

Sub-directory file usage:

if i write a file using FileOutputStream to data/data/com.exmaple.ui/myfolder**,and make the file readable. its not allowing me to read the file like above using intents any reason?

Thanks NitZ

like image 717
NitZRobotKoder Avatar asked Jan 11 '15 11:01

NitZRobotKoder


People also ask

What is internal storage in Android app?

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 are the different storage methods in Android?

Android provides two types of physical storage locations: internal storage and external storage. On most devices, internal storage is smaller than external storage. However, internal storage is always available on all devices, making it a more reliable place to put data on which your app depends.

How much memory can an Android app use?

Early Android devices had a per-app cap of 16MB. Later this cap increased to 24MB or 32MB.

How do I give permission to internal storage on Android?

Storage permissions Android defines two permissions related to storage: READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE . As you can see, permissions are only defined for accessing external storage. That means that every app, by default, has permissions to access its internal storage.


2 Answers

As far my little knowledge about Android goes, there is no upper limit set in Android. Rather in api version specification, it asks for min available shared memory (for data storage) on devices.

e.g. From Android 4.0 Compatibility Definition (http://static.googleusercontent.com/external_content/untrusted_dlcp/source.android.com/en/us/compatibility/android-4.0-cdd.pdf)

"Device implementations MUST offer shared storage for applications. The shared storage provided MUST be at least 1GB in size"

Same is said in Android 4.3 Compatibility Definition (http://static.googleusercontent.com/external_content/untrusted_dlcp/source.android.com/en/us/compatibility/android-4.3-cdd.pdf)

So as far as my findings go, its restricted upon OEMs to ensure this min shared storage (irrespective of internal storage / sd card) for third party apps aka upper limit depends on the available total storage of the device. e.g. we could theoretically store 64GB data in a device with 128GB SD card.

I hope this post helps in your quest.

like image 54
Amit K. Saha Avatar answered Sep 28 '22 21:09

Amit K. Saha


Adding on to Amit K. Saha answer..

1)Any Application can store upto available device internal memory, no restriction.

2)Whichever application first reserve gets the first prioprity.First-Come-First-Served.

3)Used file provider: Copied the files to app private memory(so that the file is protected) sub-folder and use file provider to give access to the files so that ,the external app can show content.

https://developer.android.com/training/secure-file-sharing/setup-sharing.html

like image 34
NitZRobotKoder Avatar answered Sep 28 '22 21:09

NitZRobotKoder