In android, what is the simplest way to determine the duration of an audio file (assume I have an URI of the file on the phone)?
Do I need to create and prepare an media player for each file I want to determine the duration of the file?
Thank you.
If MediaScanner is running on the phone then you can use MediaStore to get that information.