When we write the application, may save a lot of pictures, big small, only our application will be used, for a variety of reasons do not want users to see, I think if the user saw, lost my application of that layer of mysterious veil, Users are meters have carefree to open your layer of folders to look at your saved pictures or audio and video and other multimedia files. However, many like the image gallery software or music player video player when playing local audio and video will scan the user's file system, will be your saved multimedia files swept out.
At this time if you save a small picture too much, or too much audio, the user after a lot of pages, full screen or your app inside can cause users to dislike, so that uninstall your app.
How to avoid this situation?
1. When creating a picture, do not create files with a. jpg or. png file name, read directly to the stream of files to read, so the file system does not know what you are the files, the disadvantage is that you do not know your own save the success of No, you do not know what you save is thousand what things, not very intuitive. And can only be read in a stream way.
2, directly in the form of pictures to save in the folder, in the folder to create a file named
. Nomedia , so that your multimedia files relative to the system is hidden. Isn't it convenient?
Android Development How to let the program generated picture files will not be scanned by the system