Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
xManMythLegend
Old
#1  
xManMythLegend's Avatar
Senior Member - OP
Thanks Meter 44
Posts: 1,195
Join Date: Dec 2008
Location: NYC
Default What keeps Android apps from looking into specific folders ? ((music/pics/vids))

There's been ongoing discussions for a long time about the best way to "hide" certain media to keep them from showing up in media players.
Every 3rd party App Ive dled for Music/Movies/Pictures has had the same issue of scanning all the media in the SD card.

Is this some inherent mandate in Android ? Or lazy dev programming ?

I have podcast apps that only pick up podcasts. NYC subway map app that only picks up its MAP images...
Yes open up any media player and I see all of these included with my media.

Obviously the function is in there
 
SilentMobius
Old
#2  
Senior Member
Thanks Meter 35
Posts: 259
Join Date: Apr 2007
add a file called .nomedia and Android will not index that directory
 
xManMythLegend
Old
#3  
xManMythLegend's Avatar
Senior Member - OP
Thanks Meter 44
Posts: 1,195
Join Date: Dec 2008
Location: NYC
The no media trick does not solve the problem.
Android apps are scanning the entire SD for media instead of letting you pick a default directory.

I want to know if this is an android OS problem or an app development problem.
 
rastacre
Old
#4  
rastacre's Avatar
Junior Member
Thanks Meter 0
Posts: 25
Join Date: Apr 2009
Quote:
Originally Posted by xManMythLegend View Post
The no media trick does not solve the problem.
Android apps are scanning the entire SD for media instead of letting you pick a default directory.

I want to know if this is an android OS problem or an app development problem.
well i wouldn't call it a problem.. it's just the way the mediascanner works... it scans each directory on the sdcard for media files.
and both the gallery and music app relies on the system mediascanner to fetch pics/videos/music: it's called intended design

There is no way to set a default location for those apps.

3rd party apps can be developed for scanning predefined dirs at the developer's liking.

so for the stock apps the only option is the .nomedia file trick.
note that if u put the .nomedia into a directory, all the sub directories are going to be skipped too.
 
McFroger3
Old
#5  
McFroger3's Avatar
Senior Member
Thanks Meter 10
Posts: 502
Join Date: Nov 2009
Location: Winthrop
just rename the folder with a "." in front of the folder name, this makes it a hidden folder and the gallery and what not wont search it.
Sign up for Dropbox, you get extra space =] ..::http://db.tt/wAapl7o::..

Google Nexus One:
CyanogenMod 7 Nightly


HTC Rezound:
Stock

Phone History:
Nokia 5110-> Motorola Razr v3-> Sidekick 3-> iPhone 2g-> iPhone 3g-> Nokia 2610-> Black Jack 2-> Sidekick LX 2009-> Motorola Cliq-> T-Mobile G1-> Nexus One-> T-Mobile G2x-> HTC Rezound
 
xManMythLegend
Old
#6  
xManMythLegend's Avatar
Senior Member - OP
Thanks Meter 44
Posts: 1,195
Join Date: Dec 2008
Location: NYC
Quote:
Originally Posted by rastacre View Post
well i wouldn't call it a problem.. it's just the way the mediascanner works... it scans each directory on the sdcard for media files.
and both the gallery and music app relies on the system mediascanner to fetch pics/videos/music: it's called intended design

There is no way to set a default location for those apps.

3rd party apps can be developed for scanning predefined dirs at the developer's liking.

so for the stock apps the only option is the .nomedia file trick.
note that if u put the .nomedia into a directory, all the sub directories are going to be skipped too.
THANK YOU !!
I somewhat figured this out when I saw this option in Doggcatcher.

This answers my question.
 
sputnik99
Old
#7  
sputnik99's Avatar
Senior Member
Thanks Meter 6
Posts: 435
Join Date: Aug 2006
making a folder invisible doesn't help me.

I have ringtones in one folder and when I playback music, I don't want to hear ringtones.
__________________________________________________ _____

Sputnik99

Samsung Galaxy SIII LTE Jelly Bean
Samsung Galaxy SIII Jelly Bean
Samsung Galaxy Nexus Jelly bean
Samsung Galaxy Tab 10.1 3G
Nexus one running MIUI
HTC Google G1

Help me! I'm addicted to my android!
 
McFroger3
Old
#8  
McFroger3's Avatar
Senior Member
Thanks Meter 10
Posts: 502
Join Date: Nov 2009
Location: Winthrop
hmmm is there anyway you can adb push the ringtones to the ringtone folder on the system? So you wouldn't need to have it in your sd card?
Sign up for Dropbox, you get extra space =] ..::http://db.tt/wAapl7o::..

Google Nexus One:
CyanogenMod 7 Nightly


HTC Rezound:
Stock

Phone History:
Nokia 5110-> Motorola Razr v3-> Sidekick 3-> iPhone 2g-> iPhone 3g-> Nokia 2610-> Black Jack 2-> Sidekick LX 2009-> Motorola Cliq-> T-Mobile G1-> Nexus One-> T-Mobile G2x-> HTC Rezound
 
xxlikquidxx
Old
#9  
Senior Member
Thanks Meter 11
Posts: 293
Join Date: Jan 2009
download MixZing music player. It will let you select which folder on the memory card to scan for music. Select music folder and your done. No more ringtones playback
 
*Hooligan*
Old
#10  
*Hooligan*'s Avatar
Member
Thanks Meter 5
Posts: 39
Join Date: May 2008
Location: Mobile
This .nomedia trick dosnt work 100 percent. I placed it in my music folder and yes it makes the album covers disappear in the gallery but it also makes the music disappear from the music player. I can no longer scroll through artists, songs, etc from within the music player...

I am not running a rooted phone just the stock firmware with the latest Android update.


Hooligan

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

What Happened at Google I/O 2013 – XDA Developer TV

Unless you just emerged from a deep, dark, dank cavern under the Earth, you know … more

Forums Added for the LG Optimus G Pro and Sony Xperia Tablet Z

Not too long ago, we talked about how Sony was continuing its AOSP efforts on … more

Permanent Screen Off for the Visually Impaired

Most of us take the simple act of waking up our devices and having a quick glance at the … more

App Analytics, or the Death of the Independent App Developer

This is entry number one in a series of articles about tools for app developers, … more