开发者

Android: How to determine a given url is video link or a webpage

How to determine that a given link is video or a weblink...as all link dont have extension as .mp4 or .3gp etc....viz http://www.y开发者_如何学运维outube.com/results?search_query=comedy&aq=f (is a weblink) [http://www.youtube.com/watch?v=vt4X7zFfv4k][1] (is a video link) In order to call respective view as video or webview...


The only way to be sure is to get the head of the url, follow all redirects and check the mimetype of the response.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜