I want to read browser history in Android phone.

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)

...method which returns 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:

Permission Denial: reading

com.android.browser.BrowserProvider

So I added:

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

Hope it helps.

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐