How to use MediaStore to get content URI of audio file saved in sdcard ?

by Mapara,Harshit Nitinkumar » Wed, 16 Sep 2009 03:26:48 GMT


Sponsored Links
 Hi All,

I searched this , but can't find any related info.
Here is what I want to do:

In  /sdcard/downloads  folder, there is a xyz.mp3 file.
I want to save the content URI of xyz.mp3 file into my database.
xyz.mp3 is huge, so it can't be saved in database, but I want to save
it's URI in database with other records in row. So always I can get
the URI string and using content resolver I can get the xyz.mp3 file
by providing its content URI. ( I guess using openOuputStream method
of contentResolver)

So the question is, how do I do this?? how can I get content URI of
xyz.mp3 ? I guess it can be done using MediaStore, but I don't get
enough help from documentation to accomplish this.

Please help
Thanks
Harshit


--~--~---------~--~----~------------~-------~--~----~



How to use MediaStore to get content URI of audio file saved in sdcard ?

by Harshit Mapara » Wed, 16 Sep 2009 03:36:18 GMT


 Hi All,

I searched this , but can't find any related info.
Here is what I want to do:

In  /sdcard/downloads  folder, there is a xyz.mp3 file.
I want to save the content URI of xyz.mp3 file into my database.
xyz.mp3 is huge, so it can't be saved in database, but I want to save
it's URI in database with other records in row. So always I can get
the URI string and using content resolver I can get the xyz.mp3 file
by providing its content URI. ( I guess using openOuputStream method
of contentResolver)

So the question is, how do I do this?? how can I get content URI of
xyz.mp3 ? I guess it can be done using MediaStore, but I don't get
enough help from documentation to accomplish this.

Please help
Thanks
Harshit


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to use MediaStore to get content URI of audio file saved in sdcard ?

by Balwinder Kaur (T-Mobile USA) » Thu, 17 Sep 2009 07:17:18 GMT


 Environment.getExternalStorageDirectory() to get a File.
And Uri.fromFile(File f) to get the Uri.

Balwinder Kaur
Open Source Development Center
T  Mobile stick together

The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. android application error reports

Are there any details on this? There is an 'official' blog post, but
that tells us very little.

Is this a Froyo only feature? Or does it work for certain devices
only? I've being getting
reports from Motorola Droid for some time, and that are supposedly
running Eclair only
(at the time). I couldn't trigger it on my NexusOne though with stock
Eclair and Froyo.

BTW, it would be nice to get the Android version in the crash report.

Anyone care to shed some light?


-- 

2. OOT: Paging GilaOriginal

Permisi mods
Numpang jalum untuk paging rekan
Om iskandar tolong cek ym yah
Terima kasih mods :)

Salam


Desire by HTC

-- 
"Indonesian Android Community [id-android]" 

3. Detecting slow or unavailable network and black screen

4. Yahoo messenger update 1.0.2

5. Spinners identical in XML but look different when run

6. servicemanager crashing repeatedly

7. Medium density resources for v1.5 problems with workaround