Dave Thomas Dave Thomas - 1 year ago 81
Android Question

Correct way to check disk space available for Android app?

A third party library out of my control is saving files in:


I am aware of the different methods to check storage available on disk for internal and external storage: Android get free size of internal/external memory. What would be the correct method to check storage available for the path above?

Internal, External, or some sort of combination that depends on the device being used and it's storage types. Ie. should adoptable storage be considered in this check?

Alternatively is using the sticky Broadcast of Intent.ACTION_DEVICE_STORAGE_LOW a better solution?

Answer Source

Well if you have the path I believe your answer can be found inside How to find the amount of free storage (disk space) left on Android?, check the code samples there.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download