I’m able to get default history on Android 2.2 with the following cursor where CONTENT_URI point to Browser.BOOKMARKS_URI
cursor = context.getContentResolver().query(CONTENT_URI,
Browser.HISTORY_PROJECTION, null, null, null);
if (cursor.moveToLast())
String url = cursor.getString(Browser.HISTORY_PROJECTION_URL_INDEX);
But it didn’t work on android ICS i’m getting a wrong url and it’s always the same : 1970-01-01 00:00:00 http://www.samsung.com/m-manual/common
PS: to get the date i use cursor.getLong(Browser.HISTORY_PROJECTION_DATE_INDEX)
Have you tried also getAllBookmarks()?
EDIT:
Actually why the
http://www.samsung.com/m-manual/commonurl is wrong? What url are you expecting? You have not specified any columns to sort by. Bycursor.moveToLast()you are moving your cursor to the last item, not traversing the bookmarks.