How to hide non-music audio files from appearing in Android media players
August 28, 2009 | by Andrew Kameka

There’s a common Android problem of unwanted media files appearing in the song list of music players. This annoyingly causes your favorite songs to get mixed in with audio files associated with other apps, such as voice files for a GPS navigation app.
There’s a simple solution for this issue. We’ve already covered how you can hide certain files by changing a folder name to start with a dot, but you run the risk of causing problems with the app that’s linked to those files. Instead, there’s a similar solution: create a “.nomedia” file.
Here’s an easy trick that should only take a couple of minutes to keep unwanted audio files from popping up.
1. On your computer, open Notepad or any other text editor
2. Save the blank file as “.nomedia”
Make sure that the Save as type is set as “All Files” instead of “Text documents”
3. Copy that file to the folder on your SD card containing audio files you don’t want to show up.
(Example: If you want to block CoPilot sound files from coming up, place the .nomedia file in the sdcard/copilot folder)
4. Reboot your phone and the files should no longer be viewable
This same trick works for folders containing images or videos that you don’t want to appear in the Gallery app. The files will still be accessible from your original app or an explorer like Astro or Linda, but you’ll finally be able to stop hearing “Turn left” announcements after a great song.

















If only the apps responsible for these files would insert the .nomedia file themselves. I guess it's not common knowledge amongst the development community.
So useful!
And as a developer, I'm including this on my applications.
I am quite disappointed why Android is so crude to allow non-media files to appear in media player. This is trivial to code into the application (filtered file open dialog by formats) that I am puzzled they haven't done that by default.
I'm inclined to agree with you, didn't have this problem with windows mobile. Should have been handled by them already.
@ raynerape you are assuming these non music media file are in some strange format. If the audio announcment “turn left here” for say co pilot is an mp3 because the developers figured it would be a small file and a decoding library was built in, then filtering by audio file typ will be useless at preventing these from showing up in the media player. The only reason it works on the iphone is because apple uses a proprietary databas to organize and store all music instead of a simple file structure. So the iphone only thinks the file is music if itunes tells it it is music instead of pulling it from the file system. If u import non music media files into itunes, they will show up in your iphones media player. Sure this makes it convienent for not having these files in your music player, but you are locked into using itunes, which not everyone wants. And I can easily add music to this phone without a computer, by dowloading it through email or something.
Maybe make it optional to show non-media extension files, with default being not showing them. It'd be right for casual users not make them browse non-media files, but powerusers can do it.
Actually Android is Half-Baked Product, best of Homo-Logicus, and worst for Homo-Sapiens…
I am ex-iPhone User (for last two years, gracefully ran on T-Mobile) and now Skeptical User of myTouch3G, and literally wasting my time at least 2-3 minutes by setting up my T-Mobile myTouch3G, after all experience is something…
Awesome! I have been getting frustrated when working out and all of a sudden I am told to "turn left" or find out that I have "reached my destination". This is great and something that developers should add in their code
OMG I've been meaning to dig into this for a few weeks now. I play music, notification comes up, kills the sound on the whole damn phone, I have to restart. Maybe after this it will stop.
So it totally worked regarding the music player, will see if it works with affecting the sound on the device in other applications (ie phone). Thanks for posting!
wow thats so smart thank u very much
There is an easier way. Youdon't need to get your computer involved at all. If you have one of the terminal apps installed all you need to do is
cd /sdcard/(dir you want to exclude)
touch nomedia
You're done.
There is an easier way. You don't need to get your computer involved at all. If you have one of the terminal apps installed all you need to do is
cd /sdcard/(dir you want to exclude)
touch nomedia
You're done
touch .nomedia
dunno does not work with terminal emulator for android….
any clue if this works with other media files like photos?
"This same trick works for folders containing images or videos that you don’t want to appear in the Gallery app. "
In Ubuntu, you can hide files by listing them in a plain text file named ".hidden". is there something similar for Android?
yes.
.filename is hidden by default in android.
wow, thanks alot!
ok it worked….problem is that folder is now inaccesable to shuffletone!?! this is sooo annoying, ideas anyone?
I lost all of my Photos and MP4 files doing this, as per Issue 3692 http://code.google.com/p/android/issues/detail?id... . BACKUP FIRST AND USE WITH CAUTION.
Haven’t used a terminal app yet but am looking for a good free one.
Here is another way to do this without using a Comp. Install Astro or ES File Explorer. Browse to dir to exclude. Create new file and name “.nomedia”. If using Astro, create new zip file, renaming it immediately after to remove “.zip”.
Another tip: it is not necessary to reboot to see changes in Gallery (Droid and stock Android I guess). Kill the Camera app then launch Gallery again. Depending on device, different apps may need to be killed. If in doubt, kill them all or forgo any risk and reboot as originally suggested.
this doesn't work for me. I'm trying to get rid of asphalt sounds that appear on my song list. did everything that was said up there and it still appears. (yes i rebooted.)
it doesnt work instead it deletes the other files in that folder,like video files
This saved me from having all my Asphalt 5 sounds ruining my playlists ! THANK YOU !
I've also had the media files become deleted by Android because of this – I'd advise you to amend the article to put a warning as this is a fairly major caveat while the bug is at large!
I am having the opposite problem sort of. I listen to audio courses which are .mp3’s organized by directory. Most audio apps assume that I want to play musiz and proceed to scour the device look ing for files. I don’t want to have to create a playlist for files that are already organized by directory.
I have resorted to using file manager type apps and simply double clicking each file. However, that doesn’t give me much control. It won’t autoplay the next file in the directory and it doesn’t support background playing.
If anyone knows of an audio program suitable for mp3 already sorted in dir’s that do not have “artist” “album” etc information attached I would appreciate hearing about it.
Hi,
In the android api’s is it possible to hide the files ? Kindly let me know if any methods can be used to do the above ..
thank you,
regards
Sheik
Would be smarter if the developers would just limit the player to play files in one directory, something like /sdram/mp3 or /sdram/music. Or at least make it optional in the player such as the developers of MortPlayer have done.
Indeed.
hey guyz
i am having problems creating the file, it says “you must type a file name” any ideas ?
The renamed tect file method worked for me nicely,
Thanks
Thank You a lot . I have been searching it for a month. I really appreciate this post.