On many devices getExternalStorageDirectory() does not give you the SdCard but resolves to internal storage often called /sdcard or /storage/sdcard0. It does not matter if you put a microSD in the device. Those paths stay the same and are valid.
If you put in a microSD than that can be mounted under many names e.g:
, "/mnt/sd-ext
, "/mnt/sdcard-ext
, "/mnt/external_sd
, "/mnt/extsd
, "/mnt/extSdCard
, "/mnt/sdcard2
There is no function to determine the sdcard. You have to give your users the opportunity to select the storage directory.