Failed to get SAMSUNG S4 browser history

I access the browser history from the device’s own browser. I am using the following code -

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

It works fine on all devices, but in SAMSUNG S4 Cursor returns null. I find that on devices where I get the correct answer, the browser package is "com.android.browser", but on the S4 device it is "com.sec.android.app.sbrowser". This is problem? But this is the native browser in the Samsung S4.

Thanks in advance.

+4
source share
1 answer

Try it -

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

+1
source

All Articles