Android 读取浏览器历史记录 [英] Android read browser history

查看:54
本文介绍了Android 读取浏览器历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 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)

...返回Cursor的方法.

我可以帮助处理 Cursor 或任何示例代码以获取浏览器历史记录吗?

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" />

但它仍然给我同样的错误.我谷歌它,我发现这个 Accessing Data With Android Cursors.

But it still is giving me the same error. I google it and I found this Accessing Data With Android Cursors.

希望有帮助.

这篇关于Android 读取浏览器历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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