问题
I want to show preview of any url in android when I share it (like it is shown in facebook or whatsapp). the preview must contain an image from the webpage and small description of the link. I thought of picking up information from metadata and favicon, but favicon is very small in size and metadata is not always present (for example, in Quora u don't get information about the question in the metadata). Sorry for my bad english and lack of clearity.
回答1:
Checkout this Android Link Preview Library which does the same you are seeking for.

You can import the library using Gradle :
Simply add the repository to your build.gradle
file:
repositories {
jcenter()
maven { url 'https://github.com/leonardocardoso/mvn-repo/raw/master/maven-deploy' }
}
And you can use the artifacts like this:
dependencies {
compile 'org.jsoup:jsoup:1.8.3' // required
compile 'com.leocardz:link-preview:2.0.0@aar'
}
来源:https://stackoverflow.com/questions/34917503/how-do-i-create-url-preview-in-android