bossman
bossman

Reputation: 3

External Storage distinction

My question is related to storing files on android devices. I want to store files created in an app to an SD, if it is mounted. The problem i am having is that the device I am using has a non-removable external storage unit. All attempts to find the SD card result in finding that external storage and the files being saved there. Is there a work around, or a way to get a list of the external storage's, or way to directly save to the SD card?

Upvotes: 0

Views: 87

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006539

Android 4.4 offers getExternalFilesDirs() (note the plural name), which may be able to give you locations on removable media like an SD card, depending upon where it is located and how the manufacturer elected to interpret Google's rules.

Everything else on Android 4.4+, in terms of removable media, cannot be written to, except presumably via apps running with superuser privileges on rooted devices.

There is no support at all for anything beyond standard external storage on Android 4.3 and below. You will find various recipes online for trying to find other partitions that might represent removable media. These recipes are not supported, may not be reliable across all devices, and will not work on many Android 4.4+ devices.

Hence, I strongly encourage you to focus on standard external storage.

Upvotes: 1

Related Questions