标签: android video
如何检查android中媒体的MimeType?
public boolean isVideoFile(String path) { String mimeType = URLConnection.guessContentTypeFromName(path); return mimeType != null && mimeType.indexOf("video") == 0 || mimeType.indexOf("audio")== 0; }