Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I keep my media files (such as music) on my home server. When I add a new album to the home server, and want to copy it to my Android 4.0.4 phone, I use a Samba client (such as AndSMB or X-plore) to copy the files to the phone. So far, so good.

The problem is that the images in subdirectories that I copy over (such as album art) automatically get added to the gallery during the copy, although the root directory I'm copying into has a .nomedia file in it. If I start the copy, then check the Gallery app mid-copy, I see the images start to appear before I run any other apps.

I don't want the images to appear in the gallery.

If I "clear data" for the Media Storage app, then reboot, the gallery is rebuilt without the album art images, so the .nomedia file does seem to be doing its job some of the time.

Is there a way I can copy media files to my phone over a network, without them automatically getting added to the gallery?

Clearing the data in Media Storage and rebooting the phone works, but is tiresome and has other unwanted side effects like resetting my ringtones.

share|improve this question
    
Normally the .media file shoud do the trick. Is there any other file in those folders, aside your music and images? There was a question with a similar problem (I link it when I find it). And no, no client app from outside should push anything to the media database, that's the task of the media scanner. Nevertheless, mentioning involved apps/programs might bring up something we are otherwise unaware of, so it might be helpful if you edit that into your question. –  Izzy Dec 18 '12 at 19:44
    
Sounds like a different topic, but has the same issue, that is, files appearing in the gallery which shouldn't: How to stop Chrome from causing Download folder to reappear in gallery? Do you also find an ic.bin file in those folder(s)? –  Izzy Dec 18 '12 at 19:49
    
Hi Izzy, thanks for your feedback. I think I already mentioned the apps involved though (AndSMB and X-plore are the Samba clients I've tried, Gallery is where I see the images). And the folders I'm copying usually don't contain anything else, no. I saw the one about Chrome's Download folder but I think the difference here is that the new images are in subfolders below the one with the .nomedia file. I don't know if that's a factor. –  Matt Dec 18 '12 at 19:54
    
It was not clear (to me) whether you were sure that happens during copy -- or you're simply assuming so. My guess was towards other apps running on your phone during/after the copy, before you noticed the stuff turning up in your gallery. Media players would be a good example, but might be other apps as well. –  Izzy Dec 18 '12 at 19:56
    
Gotcha. Last time I tried this, I started the copy using X-plore and checked the Gallery app mid-copy. The images were already starting to appear there, before I ran any media players or other apps. –  Matt Dec 18 '12 at 20:01
show 1 more comment

3 Answers 3

up vote 1 down vote accepted

Is there a way I can copy media files to my phone over a network, without them automatically getting added to the gallery?

I don't think it's possible.

After some googling I found this info:

1) Hide Album Art from Gallery

And the provided solution:

I have all of my photos named folder.jpg/jpeg (I forget which extension) and they don't show up in the gallery.

2) [HOWTO] Make gallery remove album covers

So I did this:

  1. Add .nomedia in my music directory, eg. "Music" (only on top directory).
  2. Rename "Music" directory to "Musicc"
  3. Run Gallery, exit.
  4. Rename "Musicc" back to "Music"
  5. Run gallery and thebthumbnails no longer appear.

Also works with other directories that has thumbnails in gallery and adding .nomedia later. In my case the thumbs are still displayed.

Also take a look at this post:

How to Exclude Unwanted Images from Phone Gallery on Android

Gallery Excluder is a dedicated Android application which removes the folders that you want to exclude its showing in the default Android stock version. This application is quite simple and does the job what it says with the application name. So if you have folders which you don’t wants to show it on your Gallery then install this application, select the folder which you want to show and done.

share|improve this answer
    
Gallery Excluder might be a nice idea generally -- but it does nothing else than placing a .nomedia file into the directories to exclude. The OP stated this file already being in place. But your other two suggestions might prove helpful -- so let's count the last addition as a good idea "for completeness" :) –  Izzy Dec 18 '12 at 20:13
1  
Well the .nomedia file is in the root directory, not all the subdirectories. This app might be a way to quickly add it to the subdirectories, though it doesn't seem to be available on the market anymore. –  Matt Dec 18 '12 at 20:18
add comment

It seems that copying with X-Plore causes this issue... It makes the phone re-scan the SD card, but also seems to alert it of the fact there has been a file copied. I'm unfamiliar with what's going on in the background, but I do know this;

Copying a picture to a folder with a .nomedia file, with X-Plore, causes the image to show in the gallery.

Copying with IO File Manager, does NOT cause this issue on my phone.

Figured this might help someone.

share|improve this answer
    
Should that read "OI File Manager"? –  Matt Aug 21 '13 at 4:46
add comment

When it looked like there was no good way to prevent these images from appearing in my gallery in the first place, I started looking for a better way to remove them once they got there.

I tried unmounting and remounting the SD card, but this alone did not remove the images from the gallery.

What did work was unmounting and remounting the SD card, then running the SDRescan app. After running it, the images in subdirectories of the folder with the .nomedia file disappeared from the gallery, without me needing to reboot.

I found a few other apps that seem to do the same thing: Rescan Media, SDSync, and Media Scanner. Those might work too.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.