在Android的,什么是确定的音频文件的持续时间最简单的方法(假设我在手机上的文件的URI)?
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)?
我是否需要创建和prepare的媒体播放器,我想确定文件的持续时间每个文件?
Do I need to create and prepare an media player for each file I want to determine the duration of the file?
感谢你。
如果MediaScanner是在手机上运行,那么你可以使用MediaStore来获得这些信息。
If MediaScanner is running on the phone then you can use MediaStore to get that information.
MediaStore