Java – parsing shortened URLs in Android

How to solve the problem of redirecting a shortened URL (bit. Ly / dfasdfasf) to an Android URL?

Solution

You must request the URL and check the response to determine where the server redirects you You can use Android's HTTP libraries or Java sockets to do this Or, if you know it's a bit Ly URL, you can use their API to extend shortened URLs

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>