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.
精彩评论