For programmatic file saving, I want to open the directory path for an external storage device. I tried, but I couldn't get the SD card route. How can I go about this? Does this have a solution?
private File path = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + "");
private File path = new File(Environment.getExternalStorageDirectory() + "");
I tried getting path from above both methods but both are pointing internal memory.
When we open storage memory if sdcard is peresent it will shows like below-
device storage & sd memory card.
I'm trying to code my way to the SD memory path. I granted permissions in the manifest.
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />