کد بدست آوردن مسیر حافظه خارجی. ( برای دستگاه هایی که هم حافظه داخلی و هم حافظه خارجی دارند)
public static String getWorkingDirectory(Context context) {
String path=null;
try {
path = Environment2.getSecondaryExternalStorageDirectory( ).getAbsolutePath() + "/your/folder/";
} catch (NoSecondaryStorageException e) {
if(!EnvironmentFunctions.checkSDCard(context.getAp plicationContext()))
return null;
path = Environment.getExternalStorageDirectory().getAbsol utePath()+"/your/folder/";
}
return path;
}