I am using following method to set my working Directory
File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "xxxxxx");
Now the problem is that this gives me variable location in case of phones with multiple Sdcards. Sometimes, it automatically gives me External Sd card as default location but in Some phones like Samsung, it always gives me Internal SdCard as default location i.e. storage/sdcard0/Pictures/xxxxxxx. What i want is storage/extsdcard/Pictures/xxxxxxx. But i don't wanna hardcode the path. And also, i have heard that in Kitkat version, it is not possible to put files in external Sdcard. So How do i deal with Both the problems?
Note: I tried changing the default Storage Location in Samsung to External SdCard but it doesn't worked out.