Is there a place on the device which is not scanned by Gallery and Files?
I wish to put some images/documents/videos in a folder that would be avoided and unindexed by Gallery (and Files optionally).
The folder does not have to be encrypted or archived necessarily. So, opening a folder in Files won’t be restricted. But the contents won’t be indexed and shown up in Recent, in Photos and in Videos sublists.
Sharing this .nomedia file in the eCloud and downloading it by phone Browser, it is automatically renamed to “nomedia” (without the dot).
Then, if I try to rename this “nomedia” to “.nomedia” from phone File Manager, I get an error message and the file is erased (but if I rename it to “.noname”, for example, its OK: the problem seem to be just with “.nomedia”, not hidden files).
I tried to save it from a text editor app (“Editor”) in the phone, but it didn’t work either.
As the last message from the second link posted by @tcecyk suggest, it works with adb shell and touch .nomedia. But in Documents, the folder I was testing, .nomedia gets erased after restarting the phone. Adding .nomedia to subfolders (or, at least in Documents/subfolder) works fine.
Ps: “try to create a new folder, and put an empty .nomedia file in it”