Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: .nomedia is ignored, images still appear on the gallery

I'm building an application which download images from the web and store them into my SDCard, in order to make them invisible in the gallery I put this line to generate a .nomedia file:

FileWriter f = new FileWriter("/sdcard/Android/data/CopyImage/cache/.nomedia");

the application can successfully download the image and make the .nodata file on the same folder, but the thing is, the image is still appear on the gallery.

How could that be? Can anybody provide me a solution?

Thank you very much

like image 204
hectichavana Avatar asked May 05 '11 10:05

hectichavana


People also ask

Why does NOMEDIA keep appearing?

nomedia file. it is created by your system for reduce to open some most used apps and playing song and video. Delete the nomedia file is not a good choice. And also it uses small disk space for your own help.

How do I permanently delete .NOMEDIA files?

On a computer, delete the NOMEDIA file in the same way you would delete any file: select the file and press Delete on your keyboard, or right-click the file and select Delete. On Android, you will need to download a file manager application such as Nomedia to create and delete them.

Where are NOMEDIA files stored?

NOMEDIA files are typically found in multimedia folders or external storage cards connected to an Android smartphone or tablet. In rare cases, they may show up on a PC or Mac that has been synced with an Android device.

Why NOMEDIA file not working?

nomedia" to the folder that contains images you don't want to see in the Gallery app, and those images still appear in the Gallery? If so, try going to Settings>Apps, select Gallery, then Clear Cache/Clear Data. Then open Gallery again and wait a few seconds for the database to rebuild.


1 Answers

After you created the ".nomedia" file, you must reboot you phone and then the images of the folder will not appear on the gallery.

like image 139
alan wang Avatar answered Sep 24 '22 22:09

alan wang