A quick look shows at the source indicates the MediaScanner omits
files that begin like "._" or are like "Folder.jpg",
"AlbumArtSmall.jpg", "AlbumArt_{...}_Large.jpg" or "AlbumArt_{...}
_Small.jpg". But it all seems to be based on filename. Of course
there's a native method in there "processDirectory" that I don't
understand because I don't understand c++. Maybe that's supposed to
weed out certain folders/files? Of course, I don't know if this helps
at all but I'll let you decide if it does. Almost looks like changing
the extension will be the answer as that appears to be very important
in determining whether the MediaScanner picks up the file.
Good luck, will be interested to see the final answer on this one.

On Apr 27, 10:08 pm, clark <clarkd...@gmail.com> wrote:
> Just tried it and the sounds are showing up in the music player.  So
> much for that idea.  Anyone else  have experience with this?
>
> I guess I can try changing the extension since I pass it the Uri, and
> hopefully MediaPlayer and SoundPool don't choke.  I just have quite a
> few files and would hate to have to check them and rename them from
> within the app or have the users re-download the new data.
>
> Suggestions welcomed.
>
> ~clark
> On Apr 27, 4:51 pm, Marco Nelissen <marc...@android.com> wrote:
>
> > On Mon, Apr 27, 2009 at 4:36 PM, clark <clarkd...@gmail.com> wrote:
>
> > > I'm torn between which group to post this too, but since it is for an
> > > application I am working on, I guess I'll stick it here.
>
> > > So here we go.  I have an application which downloads data onto the
> > > sdcard to be used by the application.  Some of these files are sound
> > > or music files and the music player in android seems to parse these
> > > directories and add these files to the list.  I'd like to somehow
> > > block or hide these files from the music player.  Is there is a way to
> > > do this?
>
> > > I was thinking it may be possible to name my folder with a period at
> > > the beginning, since linux hides such files.  I'm just not sure if
> > > that is going to hide it from the music player or if there is another
> > > way to handle this.
>
> > You could have just tried it, and you would have found that that does indeed
> > have the effect you're looking for.
> > Alternatively, you can put a file called ".nomedia" in a directory to
> > prevent the media scanner from scanning that directory.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to