[android-developers] Re: MediaStore.Audio
Thanks for your reply!
Will try some code and post the results then!
On 5 maio, 22:57, Second Dancer <seconddan...@gmail.com> wrote:
> Hi Gabriel
> I'm not quite sure whether the data in the real file changes when changes
> occurs in the database, i only has done some querying operation. If you
> wanna to see the details about the media file, you may see into the
> external-xxx.db file
>
> 2010/5/5 Gabriel Simões <gsim...@gmail.com>
>
>
>
>
>
> > I´ve found a snipplet for MediaStore.Images that I think will work for
> > audio also,
>
> > public String getRealPathFromURI(Uri contentUri) {
>
> > // can post image
> > String [] proj={MediaStore.Images.Media.DATA};
> > Cursor cursor = managedQuery( contentUri,
> > proj, // Which columns to return
> > null, // WHERE clause; which rows to return (all
> > rows)
> > null, // WHERE clause selection arguments (none)
> > null); // Order-by clause (ascending by name)
> > int column_index =
> > cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
> > cursor.moveToFirst();
>
> > return cursor.getString(column_index);
> > }
>
> > This way I´m left with two questions:
>
> > How can I get the name of the track?
> > Will any changes to the container also change the data in the real
> > file?
>
> > Tnx
>
> > On 4 maio, 22:46, Gabriel Simões <gsim...@gmail.com> wrote:
> > > Hello,
>
> > > I´ve been trying to understand how to get data about all the audio
> > > files in the device using MediaAudio but unfortunately the
> > > documentation is far from clear. Also, there´s almost nothing about it
> > > on the forum right now and I couldn´t find good resources over the
> > > internet.
>
> > > I´ve seen pretty quick and objective examples on how to access the
> > > main information from the containers but I couldn´t find in any place
> > > how I could get the names of the tracks (MediaStore.Audio.AudioColumns
> > > doesn´t have an specific constant for it) and the most important, how
> > > I could retrieve the path for the media (audio file in this case) I´ve
> > > found using the info on MusicStore.Audio.
>
> > > am I missing something here? It seems it should be so easy but I can´t
> > > find the info!
>
> > > Also ... if I change any data on the container, will this data be also
> > > changed in the real file as well?
>
> > > Thanks for your help,
> > > Gabriel
>
> > > --
> > > 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+unsubscribe@googlegroups.com<android-developers%2Bunsubscribe@googlegroups.com>
> > > For more options, visit this group athttp://
> > 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+unsubscribe@googlegroups.com<android-developers%2Bunsubscribe@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Regards
>
> --
> 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+unsubscribe@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en- Ocultar texto das mensagens anteriores -
>
> - Mostrar texto das mensagens anteriores -
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home