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. How to package resource files of core classes of dalvik?

When we porting dalvik, we encountered a problem.
We compiled and package those core classes into a classes.dex file.
But how to deal with those resource files such as security.properties.
Can they also be pacakged into the classes.dex fiile? Or should use
another method to package them.
Remeber that the are core classes not application ones. So they are
not apk ones. The classes.dex will be set in the bootclasspath of
virtual machine.
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Memory Card Reader Application

So I am wondering if anyone is working on an application that would
allow me to take my card reader and hook it up to my phone to transfer
the info onto the memory card in my phone. I am a photographer and
would like to be able to back up my photos onto another memory card
when i travel. I would like to do this so I wouldn't have to carry my
computer around. I can just buy multiple large memory cards and
transfer the info as I am out and about. If there is already such a
program could someone point me in the right direction?

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

3. MOBILE SCREE PROPERTIES

4. Fails to access SurfaceFlinger even when specify ACCESS_SURFACE_FLINGER in Manifest.xml

5. Is there any truth in the Cupcake rollout rumors ...

6. Pause function of MediaRecorder.

7. after running envsetup.sh , and press "m" , it shows "command not found"