RSS

How to hide non-music audio files from appearing in Android media players

Fri, Aug 28, 2009 | by Andrew Kameka

Tricks

How to hide non-music audio files from appearing in Android media players

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.

, , , ,

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

19 Comments For This Post

  1. Tom Martin Says:

    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.

  2. Ivan Soto Says:

    So useful!

    And as a developer, I'm including this on my applications.

  3. raynerape Says:

    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.

  4. Deus Invictus Says:

    @ 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.

  5. raynerape Says:

    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.

  6. M. Mudassir Azeemi Says:

    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… :)

  7. Simon Says:

    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

  8. La Shon Says:

    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!

  9. La Shon Says:

    I'm inclined to agree with you, didn't have this problem with windows mobile. Should have been handled by them already.

  10. @imAK92 Says:

    wow thats so smart thank u very much

  11. linuxrebel Says:

    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.

  12. linuxrebel Says:

    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

  13. nick carrasco Says:

    any clue if this works with other media files like photos?

  14. cojones Says:

    touch .nomedia

  15. cojones Says:

    "This same trick works for folders containing images or videos that you don’t want to appear in the Gallery app. "

  16. Bill Says:

    In Ubuntu, you can hide files by listing them in a plain text file named ".hidden". is there something similar for Android?

  17. Gabriel Says:

    wow, thanks alot!

  18. Ben Millen Says:

    ok it worked….problem is that folder is now inaccesable to shuffletone!?! this is sooo annoying, ideas anyone?

  19. Simon Says:

    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.

Leave a Reply