I know that current version of API removed this functionality for reading bookmark history, before that I used to use attached function to access current URL, but unfortunately it does not work anymore, do you have any ideas how to achieve this problem?
Cursor webLinksCursor = ctx.getContentResolver().query(Browser.BOOKMARKS_URI, Browser.HISTORY_PROJECTION, null, null, Browser.BookmarkColumns.DATE + " DESC");
int row_count = webLinksCursor.getCount();
int title_column_index = webLinksCursor.getColumnIndexOrThrow(Browser.BookmarkColumns.TITLE);
int url_column_index = webLinksCursor.getColumnIndexOrThrow(Browser.BookmarkColumns.URL);
if ((title_column_index > -1) && (url_column_index > -1) && (row_count > 0))
{
webLinksCursor.moveToFirst();
while (webLinksCursor.isAfterLast() == false)
{
if (webLinksCursor.getInt(Browser.HISTORY_PROJECTION_BOOKMARK_INDEX) != 1)
{
if (!webLinksCursor.isNull(url_column_index))
{
return webLinksCursor.getString(url_column_index);
}
}
webLinksCursor.moveToNext();
}
}
webLinksCursor.close();
return null;