I am developing an android application where it will select some photos from the gallery and hide them,
i am able to select particular picture from gallery and store it in my app and delete it from gallery,but a person can see those pictures if he opens my app folder in sdcard ,so how do i store them such that even if a person checks my sdcard then he should not be able to detect those pictures ?
If your phone or device doesn't already have a feature to hide photos, you can still keep them stored safely on your own. A password-protected folder on your device or even external storage like an SD card or USB drive can be a safe place to store photos once you're done editing and sharing them.
Go to the Photos app and open the image to be hidden, or select multiple images to be hidden. In the bottom-left corner, tap the "Share" icon, which looks like a box with an arrow sticking up out of it. On the bottom taskbar, scroll down and select the "Hide" option, beside an icon of a crossed-out eye.
So, you can simply hide them. Go to photos, and click on the video or the photo that you want to hide. Tap the share button with the upward arrow, and then tap Hide.
If you want to prevent Gallery from showing images from your app's folder, you can put a file named .nomedia
in that folder.
Source: https://stackoverflow.com/a/6713863/450534
If you want to hide the folder from apperaring in say, a File Manager, then ensure your folder starts with a period (.). For example, if the folder is called myfolder, it should be created as .myfolder
Source: https://stackoverflow.com/a/5878270/450534
Please note, that a user can change the settings of the File Manager to show hidden files and folder. For that, there is no solution.
The only secure way to do this is to encrypt the image data yourself and remove the original files, leaving only your application able to decrypt the files.
Take a look at How to encrypt file from SD card using AES in Android? to see how this can be done.
As an additional step, you can also use any number of the other answers to hide the encrypted files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With