I'm using CyanogenMod 10.2.1 on an Xperia ZR. This device has an emulated SD card and a removable SD card. The stock camera app has an option to store images in the emulated or the removable SD card (see screenshots below).
I'm writing a camera app and I want to do the same thing, so I looked at the code of the camera app in Android's source and in CyanogenMod's source. The first uses Environment.getExternalStoragePublicDirectory()
and the second Environment.getExternalStorageDirectory()
. Neither of those seem to be dynamic, so where does the setting item come from?
Here are some screenshots showing the storage option:
All in all, I want to find out whether those apps use the techniques in Find an external SD card location to access secondary storage.