• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Nomedia not hiding recent files

The_Chief

Accept no imitations!
  • Nov 17, 2009
    15,965
    18,895
    Manchester, Tennessee
    Android has long had the ability to hide entire folders from the gallery, simply by including an empty text file named '.nomedia' in the folder. The dot in front should put it at the top of the alphanumeric list, and it tells the gallery that there is nothing in the folder to display. I've used it for years.

    A year ago the Darling Bride had surgery, so I've been keeping a photographic record of her recovery, taking photos each month and saving them in a folder hidden with the .nomedia file.

    I'm suddenly having a problem with the photos, that I expect to be hidden, showing up in the gallery! Not good! When I look at the details of the photos, the file location confirms that it's in the folder that I want hidden. It's not ALL the photos in the folder, just recent ones.

    Any ideas on why the .nomedia file is letting these sneak through?

    BTW yes, I know I have a Note8 and could move those pictures to my Secure Folder. I don't want to do that. Every time I upgrade phones, I have to move everything out of the Secure Folder, change phones and move them all back in. Too much work!
     
    It's strange because all the older photos in the nomedia folder are hidden and not in the gallery - it's just the recent ones. It's as if a new update killed the nomedia function and it won't work for any photos taken AFTER the update. Yep, that's a stretch... but I'm not exactly wealthy with ideas here...
    Is it possible an update has the photos stored in multiple locations?
     
    • Like
    Reactions: svim and lunatic59
    Upvote 0
    ... Any ideas on why the .nomedia file is letting these sneak through?
    Maybe it might help to re-adjust your thinking to address the problem from a different direction?. A .nomedia file doesn't actively do anything, it has no functionality as a file. It's a matter where apps detect it's presence in a directory, so by conventional standards that directory should be excluded from being scanned and indexed by whatever media app.
    So instead of focusing on the .nomedia file, I'd be looking at the Gallery app (or whichever photo manager app you're using) as the culprit. Wipe it's cache, maybe even do a 'Clear data', reconfigure its settings, and just force it to re-index everything again.

    P.S. Hope your significant other is healed up and all is well. Lighting some incense and beaming random, good thoughts out your way.
     
    Upvote 0
    No, because when I call up the details of the photo, its location is listed as the local folder, on my SD card, that the gallery is not supposed to see. When I use a file explorer to look at that folder, .nomedia is listed as a file (but it's not first... which is odd).

    I'm going to try a workaround that involves copying the image to my PC, deleting the photo on the phone, and then moving the file from the PC directly into the hidden folder. That way, there should be no trace of the image being moved from the gallery.

    If that works, then it means that there is now a residual connection between the DCIM/camera folder and my 'other' folder, where no connection existed before. I'll keep you posted.
     
    Last edited:
    Upvote 0
    Is it possibly indexing it when it originally gets taken and put in the gallery, and then that index entry is simply updated to reflect the new location. In which case, it wouldn't be indexing the .nomedia folder, it would be updating an existing entry. I think you could test this by moving a photo from the gallery to the folder at the same time as copying a photo externally to the same folder. If the photo moved from the gallery is indexed and the file moved from external (never in the gallery) isn't, then that may point to an updated index entry being the case.
     
    Upvote 0
    Same EXIF info as the earlier ones? The file format identical to the photos that show up?

    If you have changed your EXIF files to keep location or other info, it could trigger the photo not being posted as having too much info.

    I'm wondering if you are somehow being affected by the EU privacy laws. Some US companies will keep the same laws here. If your photo contains your phone's info, that info might have to be stripped out to post pic.
     
    Upvote 0
    It might be prudent to look into that issue you referred to where that .nomedia file is no longer first. Is the view sort set for alphabetical or something else? Typically when alphabetical any file with a proceeding . in the file name should be first. If the file manager is set for alphabetical, if you view that same directory using a terminal app and enter a 'ls -l' command, is that .nomedia file at top?
     
    Upvote 0
    Have you tried hiding the folder itself? Rename the folder with ".myfoldername" and it should disappear. A refresh of the gallery app should make the photos disappear.
    You will need a file browser that enables viewing hidden files/folders tho.

    I use Solid Explorer, so that shouldn't be an issue. Thanks for the suggestion... I have always had the .nomedia file in the main "hidden" folder PLUS all the subfolders. I renamed my folder with a dot on the front as suggested - but the images were still in the gallery. I went into Settings --> Apps and cleared the Gallery's cache, then rebooted the phone. Upon opening the Gallery, I found that all the photos were GONE... except for one that I had forgotten to move. I use Solid Explorer to move it, and it was STILL in the Gallery with the new location, dot and all, in the details! I have no idea why.

    It might be prudent to look into that issue you referred to where that .nomedia file is no longer first. Is the view sort set for alphabetical or something else? Typically when alphabetical any file with a proceeding . in the file name should be first. If the file manager is set for alphabetical, if you view that same directory using a terminal app and enter a 'ls -l' command, is that .nomedia file at top?

    Yes, I had the contents sorted by date, not filename. Shouldn't matter how the file explorer app is sorting them, since the Gallery is a completely different app. The Gallery has an option in the menu to hide/unhide certain folders - but since my "hidden" folder has the .nomedia file in it, that folder doesn't show up at all. Just certain recent photos from it.

    WEIRD!
     
    Upvote 0
    This sounds like an issue with the galley app itself. Have you tried other gallery apps @The_Chief ? Maybe also look for reviews of the gallery app on the store to see if any others are having the same issues?

    I'll assume your using the default Samsung "Gallery" with your Notes 8. If so have you tried the built-in Hide Album option? Just select the Albums tab and then hit the options to find the Hide/Unhide options.
     
    Upvote 0
    Haha, it's fine on my Samsung S8+ with the latest OS update and updated gallery.

    I was just wondering. Because Chinese manufacturers will often ignore Google and do their own things, sometimes to the detriment of the users. I know that Samsung likes to customize Android in their own way as well, which can sometimes cause problems, like there's been a lot of people howling about Oreo, and individual SMS sounds not working.
     
    Upvote 0
    This sounds like an issue with the galley app itself. Have you tried other gallery apps @The_Chief ? Maybe also look for reviews of the gallery app on the store to see if any others are having the same issues?

    I'll assume your using the default Samsung 'Gallery' with your Notes 8. If so have you tried the built-in Hide Album option? Just select the Albums tab and then hit the options to find the Hide/Unhide options.

    Because I have the .nomedia file in the folder, it doesn't show up as an album in Gallery to de-select. The vast majority of the photos (and videos, ain't going there LOL) are hidden... as they should be. It's just the recent ones that are showing up! It's bizarre!

    But I have not bothered with any 3rd party gallery apps, as I've never needed one. I don't want to avoid this problem - I want to determine the cause and fix it.
     
    Upvote 0
    I always use a microSD card, and everything gets saved to it. So it wouldn't be a matter of storage destination, as I've always done that and this is a new issue. Of course, I'm not going to have Samsung help me with the problem because that would involve walking them through the issue on my phone - and while they're halfway around the world, these are pictures I'm not inclined to share with just anybody LOL
     
    Upvote 0
    I thought as much @The_Chief :)

    Further to this I had a little play around. I use Solid Explorer to whizz around my files and found an issue.

    When creating a no media condition on the internal storage the file is created perfectly and the files disappear as soon as I enter the gallery app. If I do the same on my SD card the system automatically creates 2 files.

    .nomedia
    .nomedia.txt

    I thought this maybe the issue as nothing hides, so I deleted the text file. However this also deletes the .nomedia file.. :thinking: No matter what I did I ended up with the 2 files, so I copied a .nomedia file from my internal storage. Sadly the files still did not hide..


    Scrub the above, it would seem this text file appears also on the internal storage too, at some point.

    --->

    Ok so I think I've found the issue, it seems to be how the gallery app handles a nomedia status, specifically within the SD card.

    If I create a nomedia file on my internal storage in the camera folder and pop back to the gallery app all the files are gone. If I then delete the nomedia file they all come back into the gallery app.

    Now if I do the same on the SD card nothing happens, however if I force close the app and clear the cache I get a notification within the app about the nomedia file and only place markers show! See attached picture.

    However if I paste any images within that folder they show up in the gallery.

    If I repeat the test with the internal memory the exact same result occurs as above. I get a notification, files disappear, when pasting new files within the folder they show up in the gallery.

    So in conclusion I would say there is a direct issue with how the gallery app is handling the no media status and specifically how it handles the status on an SD card due to the fact nomedia generally works as it should on the internal storage, unless new files are added to the folder.

    Sorry if this seems rushed, I'm at work.. :oops:
     

    Attachments

    • Screenshot_20180620-051706_Solid Explorer.jpg
      Screenshot_20180620-051706_Solid Explorer.jpg
      66.1 KB · Views: 233
    • PSX_20180620_054203.jpg
      PSX_20180620_054203.jpg
      85.9 KB · Views: 358
    Upvote 0

    BEST TECH IN 2023

    We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

    Smartphones