Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,780,303 Members 42,459 Now Online
XDA Developers Android and Mobile Development Forum

GALLERY - Howto Prevent Indexing Certain Directories

Tip us?
 
SemperAndroid
Old
#1  
SemperAndroid's Avatar
Member - OP
Thanks Meter 15
Posts: 67
Join Date: Nov 2010
Location: Viera, FL
Default GALLERY - Howto Prevent Indexing Certain Directories

I have a folder on my SD card that I don't want images to appear from. Is there a means to exclude certain directories?

Sent from my DROIDX using XDA Premium App
 
Pfeffernuss
Old
#2  
Pfeffernuss's Avatar
Senior Member
Thanks Meter 682
Posts: 2,841
Join Date: Jun 2009
Location: Wassenaar
Put an empty file called .nomedia in the directory.

LG G3 32GB D855 Stock Android 4.4.2 V10j Rom Stock kernel Tethered recovery
Samsung i9505 Galaxy S4 GE Danvdh 27-06-2014 Googy kernel XXUFNA1
Nexus7 2013 Flo Android 4.4.3 ElementalX 2.12 kernel KOT49H
Samsung Galaxy Tab 8.9 AOKP CM10.3 Default kernel
HTC Flyer 3G ICS Yetki 1.2 ChaosX 2.6.35.10 kernel

The Following User Says Thank You to Pfeffernuss For This Useful Post: [ Click to Expand ]
 
selytch
Old
#3  
Member
Thanks Meter 2
Posts: 40
Join Date: Sep 2006
This one works well for me - makes the process easier:
https://market.android.com/details?i...iokuma.nomedia
The Following User Says Thank You to selytch For This Useful Post: [ Click to Expand ]
 
kyouko
Old
#4  
kyouko's Avatar
Senior Member
Thanks Meter 251
Posts: 1,083
Join Date: Mar 2010
Location: IL/WI border
What kind of images don't you want to show up in your gallery?

The .nomedia method should work for you, if not you can always rename the folder with a "." at the beginning to make it hidden

Folder name examples:
.pr0n / .dontlookhere / .ignore
Greed is for amateurs
The Following User Says Thank You to kyouko For This Useful Post: [ Click to Expand ]
 
JMMusic
Old
#5  
Senior Member
Thanks Meter 10
Posts: 135
Join Date: Jul 2010
Location: Frankfort, KY

 
DONATE TO ME
Quote:
Originally Posted by kyouko View Post
What kind of images don't you want to show up in your gallery?

The .nomedia method should work for you, if not you can always rename the folder with a "." at the beginning to make it hidden

Folder name examples:
.pr0n / .dontlookhere / .ignore
.nomedia works for me, as far as keeping stuff out of the gallery. Being all grown up in my computer usage, I choose to not let my computing devices hide stuff from me, so that .folder thingy doesn't work for me (and pictures in those .folders without a .nomedia file still seem to make their way into my gallery).

I do have a .stuff folder for my .porn though... Keeps it up near the top of the list...
Online file storage usable from Android:
Market apps:
https://www.sugarsync.com/referral?rf=fj0pvxnitcbkp (app is Sugarsync)
http://db.tt/qCJi1Tg (app is Dropbox)
http://www.cx.com (app is Cloud Experience)
http://skydrive.live.com (app is Sorami)
http://www.zumodrive.com (app is Zumo)
http://www.box.net (app is Box.net)
http://amazon.com/Clouddrive (app is AmazonMP3)

Web access:
http://www.adrive.com
http://www.myotherdrive.com
 
cpark_12
Old
#6  
cpark_12's Avatar
Senior Member
Thanks Meter 7
Posts: 338
Join Date: Feb 2011
Location: Cairo, GA
how about the hideitpro app from the market? it's actually pretty cool. opens up as an audio manager, then you put in a password and there you have all the hidden files you want. not just pics...just an fyi
 
whipping
Old
#7  
Senior Member
Thanks Meter 12
Posts: 138
Join Date: Sep 2010
Install the app Just Pictures and ignore the folders you don't want to see.
The .nomedia "solution" prevents the album art to display in the media players.
 
MrToilet
Old
#8  
Junior Member
Thanks Meter 0
Posts: 6
Join Date: Jun 2009
I use the app QuickPic from the Market, and in the app you can choose which folders you want include and exclude. Pretty useful. You don't have the pretty 3-D effects from the default Gallery app but it's so much faster.
 
RavenFB
Old
#9  
RavenFB's Avatar
Member
Thanks Meter 14
Posts: 94
Join Date: Nov 2010
Location: New Douglas, Illinois
You can do the same thing with Fishbowl Gallery. You can set default albums, as well as hide albums. However, this still doesn't prevent someone from stumbling upon the default gallery app. The best solutions are either .nomedia, or do not have media on your phone that you do not want prying eyes to see. Alternatively, while cumbersome, you can use androzip or unrar pro to zip the material in question. Of course, by zipping your files, you can add the additional layer of security by encrypting it, if you're the paranoid sort.

Sent via Tapatalk on CM7.0.0-Vision Stable.
 
KCRic
Old
#10  
KCRic's Avatar
Senior Member
Thanks Meter 243
Posts: 1,134
Join Date: Aug 2010
Location: Overland Park
I remember this method. Any one know if the older file deletion ever got fixed with 2.2.1 or later?

If you don't know what I'm talking about here's a quick rundown.

You put the .nomedia file in a folder with pictures, upon reboot all those pictures are deleted. This had something to do with them already being scanned once and them being older than the .nomedia file so instead of ignoring them it deletes them. Something along those lines (anyone have the link to the original bug report from back in '08 or '09?).

Anyway, if it hasn't been fixed you've been warned, you stand a good chance of losing all media in those folders. So backup those files - but you knew that already

The easiest remedy to this is to remove the files, rename the folder to .whatever or insert the .nomedia file. Reboot. Then throw the files back onto the sdcard. That should eliminate any issues.
MyTouch 3G (Yeah, I know...) Rooted w/ unlocked bootloader - Retired
G2 (Desire Z) Rooted w/ unlocked bootloader and carrier restriction - Retired
Epic 4G Touch (Galaxy S II) - Retired
Nexus 4 16GB - Rooted w/ unlocked bootloader - Retired
T - Mobile Galaxy S 4 - Knox Free. Running Wicked v10 w/ Chronic kernel - Current

24kbps 1080p w/ 320kbps audio @ 48KHz camera mod by me. Also w/ How-to.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes