needs to be a text file
to make the ".nomedia" file work you need to open it as a text file in a plain text editor and add a few characters in it and save. This way the system will recognise it as a txt file and it should work.
I used ES File Explorer and ES Editor (comes with file explorer)
It did not work for me either until I discovered the above.
Edit: In a Linux environment any file that starts with a "." is a hidden file so you have to enable "show hidden files" in ES File Explorer or your chosen file browser to have it visible to open it.