How to write files to external storage (sdcard)
External storage is not an "sdcard" on most Android devices.
When I go to My Files, the directory always appears in /storage/emulated/0 and not on the sdcard
That is because /storage/emulated/0
is external storage.
Quoting the documentation:
Every Android-compatible device supports a shared "external storage" that you can use to save files. This can be a removable storage media (such as an SD card) or an internal (non-removable) storage.
There is almost no support in the Android SDK for alternative storage locations, such as an SD card. Android 4.4 has a bit, as is described on the same documentation page:
Sometimes, a device that has allocated a partition of the internal memory for use as the external storage may also offer an SD card slot. When such a device is running Android 4.3 and lower, the getExternalFilesDir() method provides access to only the internal partition and your app cannot read or write to the SD card. Beginning with Android 4.4, however, you can access both locations by calling getExternalFilesDirs(), which returns a File array with entries each location. The first entry in the array is considered the primary external storage and you should use that location unless it's full or unavailable. If you'd like to access both possible locations while also supporting Android 4.3 and lower, use the support library's static method, ContextCompat.getExternalFilesDirs(). This also returns a File array, but always includes only one entry on Android 4.3 and lower.