如何创建具有缩略图Android部件网页书签? [英] how to create a web Bookmark with thumbnails android widgets?

查看:182
本文介绍了如何创建具有缩略图Android部件网页书签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何让网页书签的缩略图?请给我如何获得当前书签网站的缩略图或屏幕芽的想法。

Could anybody know how to make web bookmark with thumbnails? please give me an idea on how to get the thumbnails or screen shoots of current bookmark websites..

这是我想学习小部件..结果

this is the widget that I would like to learn..

推荐答案

这是ICS +只:

浏览器API正在沿着联系人API的线路修补,现在书签链接到帐户,也有一个文件夹structure.As据我所知,新的内幕还没有被通过公共的API调用暴露出来,所有的实现都有可能在未来被改变,你的应用程序可能会停止工作,然后,如果你使用的内部API。尽管如此,它的价值,而要知道Android浏览器提供商的内部运作:

Browser API is being revamped along the lines of Contacts API, now bookmarks are linked to Accounts and also have a folder structure.As far as I know, new Internals have not been exposed via public API calls, and all implementations are likely to be changed in future, and your App might stop working then, if you use internal API. Still, its worth while to know internal workings of android browser provider:

在<一个href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android-apps/4.1.1_r1/com/android/browser/provider/BrowserProvider2.java#BrowserProvider2\"相对=nofollow> BrowserProvider2 。现在,缩略图是在不同的表,并拥有自己的<一个href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android-apps/4.1.1_r1/com/android/browser/provider/BrowserProvider2.java#226\"相对=nofollow> URI 。但在内部,他们被放置在数据表中的图像,这也有一个<一个href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android-apps/4.1.1_r1/com/android/browser/provider/BrowserProvider2.java#222\"相对=nofollow> URI 。

In BrowserProvider2 . Now, thumbnails are in a different table, and have their own URI. But internally, they are placing data in images table, this also has a URI.

有一个在新的结构<一href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android-apps/4.1.1_r1/com/android/browser/provider/BrowserProvider2.java#401\"相对=nofollow>书签表和<一个href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android-apps/4.1.1_r1/com/android/browser/provider/BrowserProvider2.java#474\"相对=nofollow>缩略图表和<一个href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android-apps/4.1.1_r1/com/android/browser/provider/BrowserProvider2.java#437\"相对=nofollow>图片表。然后,看到书签是如何被插入:

Have a look at structure of new Bookmarks table and Thumbnails table and Images table. Then , see how bookmarks are being inserted :

  • Legacy calls
  • Bookmarks insert
  • Extraction of thumbnails etc
  • Extracted Images insertion

此外,<一个href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android/4.1.1_r1/android/provider/BrowserContract.java#BrowserContract\"相对=nofollow> BrowserContract 有这些列定义为<一个href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android/4.1.1_r1/android/provider/BrowserContract.java#186\"相对=nofollow> ImageColumns 这些店,缩略图,图标和触摸图标等。

Also, BrowserContract has these columns defined as ImageColumns these store, thumbnails, favicon, and touch icons etc.

最后,<一个href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android-apps/4.1.1_r1/com/android/browser/provider/BrowserProvider2.java#877\"相对=nofollow> 查询() 有<一个比赛href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android-apps/4.1.1_r1/com/android/browser/provider/BrowserProvider2.java#1069\"相对=nofollow> 图片 (没有ID,网址是主键)和<一个href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android-apps/4.1.1_r1/com/android/browser/provider/BrowserProvider2.java#1104\"相对=nofollow> THUMBNAILS (用ID)。

Finally, query() has matches for IMAGES (no id, url is primary key) and THUMBNAILS (with id).

所以,从这里你可以得到你需要使用新的<一个什么形象href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android/4.1.1_r1/android/provider/BrowserContract.java#BrowserContract.Bookmarks.0CONTENT_URI\"相对=nofollow> CONTENT_URI 的<一个href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android/4.1.1_r1/android/provider/BrowserContract.java#BrowserContract\"相对=nofollow> BrowserContract ,用<一个追加它href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android-apps/4.1.1_r1/com/android/browser/provider/BrowserProvider2.java#202\"相对=nofollow> URI的图像,缩略图等,并运行查询/插入。

So, from here you can get whatever images you need using new CONTENT_URI of BrowserContract, append it with URI's of Images,Thumbnails etc and run your queries/inserts .

这篇关于如何创建具有缩略图Android部件网页书签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆