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

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -