【问题标题】:Displaying preview of any URL link entered by the user like Skype?显示用户输入的任何 URL 链接的预览,如 Skype?
【发布时间】:2018-01-10 18:01:56
【问题描述】:

我想在 .例如,如果我在 Skype 应用程序中向其他人输入 youtube url,它会自动显示用户输入的该 URL 的缩略图预览。

https://www.youtube.com/watch?v=QUgRDYehv0M

当我输入上面的网址时,Skype 会自动显示该链接的缩略图预览,如下所示:

就像我想在 android 中做的 skype 一样。每当用户输入任何 url 意味着.. 我需要显示一个 url 的预览..

https://play.google.com/store/apps/details?id=com.leocardz.link.preview&feature=search_result

上面提到的应用程序..任何其他帮助或指导都会有所帮助。

【问题讨论】:

标签: android url


【解决方案1】:

您可以使用 Gradle 导入库:

只需将存储库添加到您的 build.gradle 文件中:

repositories {
    jcenter()
    maven { url 'https://github.com/leonardocardoso/mvn-repo/raw/master/maven-deploy' }
}

您可以像这样使用工件:

dependencies {
    compile 'org.jsoup:jsoup:1.8.3' // required
    compile 'com.leocardz:link-preview:1.2.1@aar'
}

您可以参考this链接了解更多详情。

【讨论】:

  • hi @Mitesh compile 'com.leocardz:link-preview:1.2.1@aar' 给出错误
  • 对不起,我忘了更新它已经解决了我只使用了你的解决方案。谢谢+1
猜你喜欢
  • 2011-09-09
  • 2017-03-21
  • 2016-06-05
  • 2011-12-18
  • 1970-01-01
  • 1970-01-01
  • 2015-08-31
  • 1970-01-01
  • 2020-04-26
相关资源
最近更新 更多