我想读的浏览器历史记录中的Android手机。
I want to read browser history in Android phone.
我已经做了一些文档的阅读,后来我才知道,我们可以通过android.provider.Browser类读取浏览器的历史记录。它有:
I have done some document reading, then I come to know that we can read browser history by android.provider.Browser class. It has :
final static Cursor
getAllVisitedUrls(ContentResolver cr)
...方法,它返回光标
。
我可以得到帮助来处理光标,或者例如code以获得浏览器的历史?
May I get help to handle Cursor, or any example code to get browser history?
推荐答案
不是一个真正的答案,但我可以告诉你,我做了什么。
Not really an answer but I can tell you what I did.
我第一次克隆浏览器回购并尝试重现他们是如何得到的历史。 而我开始:
I first clone the browser repo and try to reproduce how they get the history. And I started getting:
权限拒绝:阅读 com.android.browser.BrowserProvider
Permission Denial: reading com.android.browser.BrowserProvider
于是我说:
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
但它仍然是给我同样的错误。我google一下,我发现这个访问数据利用Android光标。
希望它帮助。
相关推荐
最新文章