There are many method available for creating a .NOMEDIA file. The most user-friendly are:
Attaching the storage device and creating the file using file explorer or manager. It is worth mentioning that sometimes system may attach a different extension to generated file. To prevent this, the “Hide known file extensions” options must be disabled.
Copying an existing .NOMEDIA file to target folder on the device. User must set the browser view to general, as multimedia mode may cause the scanner to ignore the .NOMEDIA file.
Changing the name of any existing file to .NOMEDIA. Such file will become useless, but the data its stores will be preserved and it will be possible to recover the data by changing back its name to the original one.
The process of generating .NOMEDIA files
Files with NOMEDIA file extension are generated automatically by the system. Some applications support .NOMEDIA files by default and may create such files in the folder they manage. Users are free to created their own custom .NOMEDIA files. Google Store offers many apps that are capable of generating custom .NOMEDIA files according to user-select criteria. Custom .NOMEDIA file may be used to ensure some files are only visible in some applications, but not others.