I want to get sdcard and internal storage location on my android app.
I am using this code.
String sdcard = Environment.getExternalStorageDirectory().toString();
it returns storage/sdcard0
.
and this code also returns the same
String sdcard = System.getenv("EXTERNAL_STORAGE");
and I am trying to get phone memory path with this code:
String internalpath = System.getenv("SECONDARY_STORAGE");
It returns storage/emulated/0
on my Android 4.4.2 that I want. However, in an Android 6.0, it returns null
.
Please give me a solution to get the internal storage path like storage/emulated/0
.
thanks in advance.