Reputation: 75
Is there any common way to find the specific folder in micro SD card path all crevices? how to get this path by something like /storage/extSdCard/MYFOLDER
This is my code its only working on android 4.4.
String securepath = secStoreSystem.getenv("SECONDARY_STORAGE");
String defaul_directory_tpath = secStore+"/MYFOLDER";
secStoreSystem.getenv("SECONDARY_STORAGE")
getting null value in android 4.4+ devices
Upvotes: 1
Views: 657
Reputation: 1906
As per your code you are saving external storage path to string variable path but your are using path1 for getting your folder. Please check this.
Upvotes: 0
Reputation: 1906
try this
path = Environment.getExternalStorageDirectory().getAbsolutePath();
String fileName = "myFile.txt";
//getting your file/folder
File f = new File(path + File.separator + fileName);
Upvotes: 1