I want to open external storage directory path for saving file programatically.I tried but not getting sdcard path.
How can i do this?is there any solution for this??
private File path = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + "");
or
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 want to get sd memory path through coding.
I have given permissions in 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" />
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…