I'm trying to retrieve the MP3 tags from some music files
I set up the folder and path to the file and set thet data source to 
extract metadata.

However, I'll getting null for just about all tags.  I get the proper 
duration and bitrate, so I know I'm
getting to the right file, and I can even use DDMS to pull the file off the 
device and verify the tags are there
using ther tools.  Anything wrong with this code for pulling out tags?   
 Is there another method
that works better?


File path = Environment.getExternalStoragePublicDirectory(
                Environment.DIRECTORY_MUSIC);
MediaMetadataRetriever mmr = new MediaMetadataRetriever();

File filenm = new File(path, availableFiles[0]);

mmr.setDataSource(showFileActivity.this,Uri.fromFile(filenm));

if (mmr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_TITLE) == null) 
{
        songName = availableFiles[0]; // default to filename
}

Thanks,
Marty

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to