How to get sdcard(Secondary) storage path in android?
I'm developing a File Manager app. I want show to the user the internal storage and the sdcard storage if it exists. For internal storage I use Environment.getExternalStorageDirectory().getPath() . How can I get the SD storage? not sure this solution fits a File Manager but after many years trying to get the right code, this is my most recent one: /** * Returns all available SD-Cards in the system (include emulated) * * Warning: Hack! Based on Android source code of version 4.3 (API 18) * Because there is no standard way to get it. * * @return paths to all available SD-Cards in the system