Re: [android-developers] how to recursively search for media(mp3) files in sdcard

2011-09-26 Thread KK
Thanks for your quick reply Mark. I tried to search on "how to use
Mediastore" and found one similar item here @
http://stackoverflow.com/questions/6208315/in-android-how-do-i-query-mediastore-only-for-files-in-a-specific-path-or-alter

Would appreciate, if you could point me to some working sample code.

Thanks,
KK

On Tue, Sep 27, 2011 at 12:19 AM, Mark Murphy wrote:

> On Mon, Sep 26, 2011 at 2:44 PM, KK  wrote:
> > I'm trying to write some simple method to recursively
> > crawl the sdcard in all foders and create a list of all mp3 files, which
> I
> > can make use of later for playing the same.
>
> This has already been done by the OS. Query the MediaStore content
> provider to find MP3 files available to the user on external storage.
> This also will handle situations where there are files that should not
> be in a music player (e.g., audiobook files).
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!
>
> --
> 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

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

Re: [android-developers] how to recursively search for media(mp3) files in sdcard

2011-09-26 Thread Mark Murphy
On Mon, Sep 26, 2011 at 2:44 PM, KK  wrote:
> I'm trying to write some simple method to recursively
> crawl the sdcard in all foders and create a list of all mp3 files, which I
> can make use of later for playing the same.

This has already been done by the OS. Query the MediaStore content
provider to find MP3 files available to the user on external storage.
This also will handle situations where there are files that should not
be in a music player (e.g., audiobook files).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

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


[android-developers] how to recursively search for media(mp3) files in sdcard

2011-09-26 Thread KK
Hi All,
This is related to a sample media player I'm write as part of learning more
of Android. For this, I'm trying to write some simple method to recursively
crawl the sdcard in all foders and create a list of all mp3 files, which I
can make use of later for playing the same. I tried google to find some
efficient way to do the same, but found that most of them are suggesting
having your own recursive method to the same. I also bumped into this URL @
http://stackoverflow.com/questions/3289649/recursively-add-files-in-java-speed-issue
but
don't know how to use the idea presented therein in a efficient wayy. Would
appreciate if someone could help me getting this. Any working example for
the same would be very helpful.

Thank you.
KK

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