VOLUME_EXTERNAL includes phone internal storage and SD card storage. VOLUME_EXTERNAL_PRIMARY only includes phone internal storage. See the API introduction as follows: public static Set < String > getExternalVolumeNames ( Context context)
Returns a list of all specific volume names that make up VOLUME_EXTERNAL (ie, list of names including phone internal storage and SD card storage). This includes a unique volume name for each shared storage device currently attached, typically MediaStore#VOLUME_EXTERNAL_PRIMARY. VOLUME_EXTERNAL_PRIMARY refers to the phone's internal storage.
Each specific volume name can be passed to APIs like MediaStore.Images.Media#getContentUri(String) to interact with the media on that storage device.
public static Uri getContentUri (String volumeName, long id)
Returns the uri of media data such as pictures or videos on the phone.