android - Is there a way to determine the duration of an audio file -


In Android, what is the easiest way to determine the duration of an audio file (assuming I have a URI of a file Is the phone)?

Do I need to create and prepare media players for each file to determine the duration of the file?

Thank you.

>

If MediaScan is running on the media then you can get that information by using MediaStore You can.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -