Tips
How to hide non-music audio files from appearing in Android media players
August 28, 2009 | by Andrew Kameka
Android Tricks
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.
touch .nomedia
not
touch nomedia.
You forget dot ;P
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. "
works for all media.
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.
Astro file manager allows you to create playlists by multi-selecting the files in a folder, long pressing to bring up options, clicking "music" and creating playlist. After playlist creation, go to music>playlists and enjoy
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.
does it work properly on galaxy s??
works on the galaxy s2
Worked a treat on my HTC Desire Froyo. Just created a .nomedia file and placed in root of Gamesloft, now I don't get any annoying 'good shot' 's in the middle of playing my music. Thanks very much for the post.
Searching for this for ages. HUGE thanks man!
Gumbies in this thread, really. Putting a ".nomedia" file into your phone SD card doesn't delete anything. It simply "hides" media files from players, scanners and the gallery. That is the intent of this trick, you obviously need to put the file into the folder you don't want to see/hear in your phone. It does not delete a thing!! If you want to see your photos/music on your phone, plug the USB in as "Mass storage" mode (or simply take out the sdcard into a reader) and you will see all your precious files are still in your phone. This .nomedia trick is just a way to hide the files from the phone interface only, not delete the files.
Thank you sooo much for this tipp! I hated all the extra noises so much! I could hug you!^^
Thank you for this!
This is stupid, I will prefer .Media file instead of .nomedia. Imagine every time i install a new apps, i have to put this in. Something is wrong with Google's developer. We need some like Steve Jobs to throw it back and the developers and go what the **** is this. Iphone seems so much polish than Google Android. This is coming from a Verizon Droid user.
Then go buy an iPhone… Why are you using android then??? Mental case…!
Nice solution, also i discovered if a file named AlbumArt.jpg (for album covers) the music player will recognize and display them, but they wont show up in the gallery (tested on froyo)
http://code.google.com/p/android/issues/detail?id…
breaks on reboot
deletes all my media…
DON'T USE THIS METHOD PEOPLE
I still have a problem. It's a good idea to create a .nomedia file but what if you have used the voice recorder? If you put a .nomedia file on your recorder, it will prevent your audio files from appearing in the voice recorder app, but if you didn't, it will show up in your music playlist.
The built-in music player is poorly implemented. I wish there was a way for it to only include specific folders and not scanning the whole device.
Great job… Love your work… Thankyou for supporting Android users in this problem…!
Great! Absolutely works! Wonderful thank you
As a (Ubuntu) Linux user I attempted to create the ".nomedia" file with Nautilus (equiv. of Windows Explorer) but it didn't work.
I thereafter did it with the command line and it worked.
Therefore if it don't work for you, be a little skeptical about the tool you are using.
A brilliant and simple piece of information! Sorted the problem very quickly. What a pleasure to have an uncluttered media player – with just the music files listed. Thank you!