title: Android retrieve duration of mp3 without MediaMetadataRetriever
body: <p>To get the duration of an mp3 file, I use this code:</p>
  
  <pre><code>MediaMetadataRetriever retriever = new MediaMetadataRetriever();
  retriever.setDataSource(audioFile.getAbsolutePath());
  String duration = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);
  </code></pre>
  
  <p>However, MediaMetadataRetriever requires api level 10. Is there a way to achieve the same for older api levels?</p>