Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/178.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从Android上的URL页面获取预览拇指?_Android_Url_Thumbnails_Preview - Fatal编程技术网

如何从Android上的URL页面获取预览拇指?

如何从Android上的URL页面获取预览拇指?,android,url,thumbnails,preview,Android,Url,Thumbnails,Preview,我正在创建一个应用程序来保留一些URL,我想在listview中的页面标题旁边显示一个预览拇指 我在Whatsapp上看到了类似的东西,当我放置一个url(例如:)时,该应用程序会得到一些预览拇指,并将其放在链接旁边 那么,我如何才能做到这一点,并将这个拇指放在我的listview中呢?最好使用API从url生成拇指图像。。。 检查这个。。。如果你想找免费的 示例:来自 经过几个小时的寻找,我找到了一个有效的解决方案,但我认为这可能不是最简单的方法 解决方案: 将页面的url下载到设备上的临时文

我正在创建一个应用程序来保留一些URL,我想在listview中的页面标题旁边显示一个预览拇指

我在Whatsapp上看到了类似的东西,当我放置一个url(例如:)时,该应用程序会得到一些预览拇指,并将其放在链接旁边


那么,我如何才能做到这一点,并将这个拇指放在我的listview中呢?

最好使用API从url生成拇指图像。。。 检查这个。。。如果你想找免费的

示例:来自


经过几个小时的寻找,我找到了一个有效的解决方案,但我认为这可能不是最简单的方法

解决方案: 将页面的url下载到设备上的临时文件中。 阅读临时文件,并尝试找到一些描述该页面的正则表达式。 下载带有之前找到的链接的thumb并删除临时文件

我一直在寻找的模式是:

<meta property="og:image" content="http://link_for_the_thumb" />
<meta content="http://link_for_the_thumb" itemprop="image">
<link rel="image_src" href="http://link_for_the_thumb">

我认为有一个更好的方法更容易做到这一点,但这是我找到的方法。等待想法


谢谢

此链接非常有趣。我以前从未见过它,但我一直在寻找与之稍有不同的东西。我已经解决了。我将在这里发帖。
<meta property="og:image" content="http://link_for_the_thumb" />
<meta content="http://link_for_the_thumb" itemprop="image">
<link rel="image_src" href="http://link_for_the_thumb">