4

I am accessing the browser history from device native browser. I use following code -

Cursor cur = getContentResolver().query(Browser.BOOKMARKS_URI,
            new String[] { Browser.BookmarkColumns.URL }, null, null,
            BookmarkColumns.DATE + " DESC");

It works fine in all devices, but in SAMSUNG S4 Cursor returns null. I find that in devices where i get proper response, Browser package is 'com.android.browser' but in S4 device it is 'com.sec.android.app.sbrowser'. Is that the issue? But this is native browser in Samsung S4.

Thanks in advance.

unflagged.destination
  • 1,576
  • 3
  • 19
  • 38
  • hm i'm trying to get browser histry from all browsers,too. But i think READ_HISTORY_BOOKMARKS only fetchs the history fro chrome. Samsung has its own browser, so it does not show up. If you start chrome on your s4, it should be listed – wutzebaer Jan 15 '14 at 13:13

1 Answers1

1

Try this-

Uri uri = Uri.parse("content://com.sec.android.app.sbrowser.browser/history"); instead of Browser.BOOKMARKS_URI.

sjain
  • 23,126
  • 28
  • 107
  • 185