I am developing audio player in android. So i want to add the details of the playing song i.e. Artist Name, Duration, Bit rate and sampling frequency. I can get Artist Name
MediaMetadataRetriever offers METADATA_KEY_DURATION which you can divide with the file size for bitrate.
METADATA_KEY_DURATION