1. Download our Official Android App: Forums for Android!

Nomedia not hiding recent files

Discussion in 'Android Lounge' started by The_Chief, Jun 11, 2018.

  1. The_Chief

    The_Chief Accept no imitations!
    Moderator Thread Starter
    Rank:
     #9
    Points:
    2,043
    Posts:
    13,796
    Joined:
    Nov 17, 2009

    Nov 17, 2009
    13,796
    13,847
    2,043
    Male
    I'm retired: every day's a Monday :P
    Manchester, TN
    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!
     

    Advertisement

  2. DonB

    DonB ♡ Truth, Justice and the American Way !! ♡ ™
    Moderator
    Rank:
     #20
    Points:
    1,423
    Posts:
    19,520
    Joined:
    Nov 30, 2009

    Nov 30, 2009
    19,520
    8,390
    1,423
    Male
    18th Hole Of the Golf Course
    Not sure why it's it's doing that, I'd have to give it more thought.

    But in the meantime you can store them on Google Drive, so viewing them on your mobile device is just as quick, and accessible for you from any device, just a thought.
     
  3. The_Chief

    The_Chief Accept no imitations!
    Moderator Thread Starter
    Rank:
     #9
    Points:
    2,043
    Posts:
    13,796
    Joined:
    Nov 17, 2009

    Nov 17, 2009
    13,796
    13,847
    2,043
    Male
    I'm retired: every day's a Monday :P
    Manchester, TN
    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...
     
  4. Unforgiven

    Unforgiven OK Google
    Moderator
    Rank:
     #1
    Points:
    4,238
    Posts:
    35,920
    Joined:
    Jun 23, 2010

    Jun 23, 2010
    35,920
    41,291
    4,238
    Male
    Douglas, MA
    Is it possible an update has the photos stored in multiple locations?
     
    svim and lunatic59 like this.
  5. svim

    svim Android Expert
    Rank:
     #45
    Points:
    608
    Posts:
    3,746
    Joined:
    Dec 19, 2013

    Dec 19, 2013
    3,746
    2,788
    608
    Illinois
    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.
     
    Mikestony and Unforgiven like this.
  6. lunatic59

    lunatic59 Moderati ergo sum
    Moderator
    Rank:
     #2
    Points:
    4,238
    Posts:
    36,796
    Joined:
    Jun 12, 2010

    Jun 12, 2010
    36,796
    35,061
    4,238
    Male
    IT
    Pennsylvania
    That's kind of what I was thinking. Maybe there's a cloud backup going on and the gallery is displaying the cloud version and not the local copy?
     
    JAy3001 and Unforgiven like this.
  7. The_Chief

    The_Chief Accept no imitations!
    Moderator Thread Starter
    Rank:
     #9
    Points:
    2,043
    Posts:
    13,796
    Joined:
    Nov 17, 2009

    Nov 17, 2009
    13,796
    13,847
    2,043
    Male
    I'm retired: every day's a Monday :P
    Manchester, TN
    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.
     
    #7 The_Chief, Jun 13, 2018
    Last edited: Jun 13, 2018
    Unforgiven and lunatic59 like this.
  8. Unforgiven

    Unforgiven OK Google
    Moderator
    Rank:
     #1
    Points:
    4,238
    Posts:
    35,920
    Joined:
    Jun 23, 2010

    Jun 23, 2010
    35,920
    41,291
    4,238
    Male
    Douglas, MA
    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.
     
  9. zuben el genub

    zuben el genub Android Expert
    Rank:
     #58
    Points:
    443
    Posts:
    7,413
    Joined:
    Jan 24, 2011

    Jan 24, 2011
    7,413
    2,654
    443
    Are they photo files or database ones? Some thumbnails might not be hidden.
     
  10. The_Chief

    The_Chief Accept no imitations!
    Moderator Thread Starter
    Rank:
     #9
    Points:
    2,043
    Posts:
    13,796
    Joined:
    Nov 17, 2009

    Nov 17, 2009
    13,796
    13,847
    2,043
    Male
    I'm retired: every day's a Monday :P
    Manchester, TN
    All photos. Some are in a subfolder which also has the .nomedia file. It's odd because photos from, say, a month ago and earlier don't show up in the gallery. Just the more recent ones.
     
  11. zuben el genub

    zuben el genub Android Expert
    Rank:
     #58
    Points:
    443
    Posts:
    7,413
    Joined:
    Jan 24, 2011

    Jan 24, 2011
    7,413
    2,654
    443
    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.
     
  12. JAy3001

    JAy3001 Android Expert
    Rank:
     #103
    Points:
    223
    Posts:
    1,004
    Joined:
    Dec 13, 2010

    Dec 13, 2010
    1,004
    395
    223
    Male
    UK
    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.
     
  13. svim

    svim Android Expert
    Rank:
     #45
    Points:
    608
    Posts:
    3,746
    Joined:
    Dec 19, 2013

    Dec 19, 2013
    3,746
    2,788
    608
    Illinois
    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?
     
  14. The_Chief

    The_Chief Accept no imitations!
    Moderator Thread Starter
    Rank:
     #9
    Points:
    2,043
    Posts:
    13,796
    Joined:
    Nov 17, 2009

    Nov 17, 2009
    13,796
    13,847
    2,043
    Male
    I'm retired: every day's a Monday :P
    Manchester, TN
    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.

    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!
     
  15. JAy3001

    JAy3001 Android Expert
    Rank:
     #103
    Points:
    223
    Posts:
    1,004
    Joined:
    Dec 13, 2010

    Dec 13, 2010
    1,004
    395
    223
    Male
    UK
    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.
     
  16. mikedt

    mikedt 你好
    Rank:
     #6
    Points:
    2,238
    Posts:
    24,631
    Joined:
    Sep 22, 2010

    Sep 22, 2010
    24,631
    13,632
    2,238
    Teachaaa
    Jinan, China
    Has Samsung broken a standard feature of Android, i.e. it's ignoring .nomedia files?
     
  17. JAy3001

    JAy3001 Android Expert
    Rank:
     #103
    Points:
    223
    Posts:
    1,004
    Joined:
    Dec 13, 2010

    Dec 13, 2010
    1,004
    395
    223
    Male
    UK
    Haha, it's fine on my Samsung S8+ with the latest OS update and updated gallery.
     
  18. KBU2

    KBU2 Android Expert
    Rank:
     #129
    Points:
    133
    Posts:
    842
    Joined:
    Apr 17, 2018

    Apr 17, 2018
    842
    242
    133
    Male
    CommScope grounding cable engineering.
    Massachusetts
    I'm impressed your post question has pulled out the Big Dogs in this forum. Me personally I just create a .nomedia file on my device or SD card under backup/.nomedia and then tick the file manager hide system files and they magically disappear. But note paste and copy to that location.
     
  19. mikedt

    mikedt 你好
    Rank:
     #6
    Points:
    2,238
    Posts:
    24,631
    Joined:
    Sep 22, 2010

    Sep 22, 2010
    24,631
    13,632
    2,238
    Teachaaa
    Jinan, China
    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.
     
  20. The_Chief

    The_Chief Accept no imitations!
    Moderator Thread Starter
    Rank:
     #9
    Points:
    2,043
    Posts:
    13,796
    Joined:
    Nov 17, 2009

    Nov 17, 2009
    13,796
    13,847
    2,043
    Male
    I'm retired: every day's a Monday :P
    Manchester, TN
    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.
     
  21. JAy3001

    JAy3001 Android Expert
    Rank:
     #103
    Points:
    223
    Posts:
    1,004
    Joined:
    Dec 13, 2010

    Dec 13, 2010
    1,004
    395
    223
    Male
    UK
    You don't have an SD Card installed do you @The_Chief ? I did a quick test and dumped a .nomedia file in my camera folder and yup, they all disappeared bar some..

    When I doubled checked I found I had new media storing to the SD card, so was not included in the media check.

    I'm sure you don't, but I thought I'd check. :goofydroid:
     
    Unforgiven likes this.
  22. The_Chief

    The_Chief Accept no imitations!
    Moderator Thread Starter
    Rank:
     #9
    Points:
    2,043
    Posts:
    13,796
    Joined:
    Nov 17, 2009

    Nov 17, 2009
    13,796
    13,847
    2,043
    Male
    I'm retired: every day's a Monday :P
    Manchester, TN
    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
     
  23. JAy3001

    JAy3001 Android Expert
    Rank:
     #103
    Points:
    223
    Posts:
    1,004
    Joined:
    Dec 13, 2010

    Dec 13, 2010
    1,004
    395
    223
    Male
    UK
    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:
     

    Attached Files:

  24. KBU2

    KBU2 Android Expert
    Rank:
     #129
    Points:
    133
    Posts:
    842
    Joined:
    Apr 17, 2018

    Apr 17, 2018
    842
    242
    133
    Male
    CommScope grounding cable engineering.
    Massachusetts
    I duplicated this scenario with my music files to show no duplicate files created but at the same time hidden.
     

    Attached Files:

    #24 KBU2, Jun 20, 2018
    Last edited: Jun 20, 2018
  25. KBU2

    KBU2 Android Expert
    Rank:
     #129
    Points:
    133
    Posts:
    842
    Joined:
    Apr 17, 2018

    Apr 17, 2018
    842
    242
    133
    Male
    CommScope grounding cable engineering.
    Massachusetts
    Screenshot_20180620-040646.png Screenshot_20180620-040723.png

    Now mind you that it's over 600 music files hidden in this location and no duplicate files as you can see in the first illustration of the post before this one.
     
    #25 KBU2, Jun 20, 2018
    Last edited: Jun 20, 2018

Share This Page

Loading...