Question Detail

I am having a database which has 15 audio file records.

while displaying i want to show duration of the audio file seperatly.

Please guide me how to get this thing done.

Note : Urgently Required .


Thread Reply

Anonymous

- 5 months ago

On which platform do you want to do this?

Please elaborate which technology you are using.

Hemant Sharma

- 4 months ago

follow the below code to get Audio file duration in Android :

MediaPlayer mplay = MediaPlayer.create(yourActivity, Uri.parse(YOUR_AUDIO_FILE_PATH));
int duration = mplay.getDuration();

Hemant Sharma

- 4 months ago

follow the below code to get Audio file duration in Android :

MediaPlayer mplay = MediaPlayer.create(yourActivity, Uri.parse(YOUR_AUDIO_FILE_PATH));
int duration = mplay.getDuration();