An Android Library with demo application, to fetch meta-data from url, like Facebook and Whatsapp ....
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependency
dependencies {
compile 'com.github.omegaes:Android-Link-Preview:1.0.2'
}
Request metadata for url, it will execute in background thread, you will get an instance from LinkPreview or an exception, keep in your mind that onSuccess, onFailed execute in background thread, use handler to access UI objects
LinkUtil.getInstance().getLinkPreview(Context, String url,GetLinkPreviewListener)
LinkPreview
class LinkPreview {
String title;
String description;
String link;
String siteName;
File imageFile;
}
GetLinkPreviewListener
interface {
void onSuccess(LinkPreview link);
void onFailed(Exception e);
}
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
Not yet