Firstly, you need to understand Android.
- Internal storage is the app private storage
- External storage is the publically accessible storage area
External storage in Android means the public storage and means internal storage as in device memory and SD card. Saving to external storage means device internal and SD card, while saving to itnernal storage means app private storage.
So, the images are stored in the external storage or the app public storage where any app can save, load and manage files. The images are publically available and thus not in internal storage by developer definition.
Now, you need the WRITE_EXTERNAL_STORAGE
permission and if you target API 23 you also need to request it because it is a dangerous permission.
To access the images, you need to create a new file:
storageDir = new File(
Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_PICTURES
),
"album name here, or remove this part to save or load directly into DCIM"
);
This can be used to save or load images, but remember to index the directory to find the image before loading to prevent IOException