1

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.

n179911
  • 19,547
  • 46
  • 120
  • 162

1 Answers1

0

If MediaScanner is running on the phone then you can use MediaStore to get that information.

MediaStore

Slinkkay
  • 176
  • 6