managedQuery est obsolète, utilisez donc getContentResolver à la place, utilisez le code suivant:
String[] proj = new String[] { Browser.BookmarkColumns.TITLE, Browser.BookmarkColumns.URL };
String sel = Browser.BookmarkColumns.BOOKMARK + " = 0"; // 0 = history, 1 = bookmark
Cursor mCur = getContentResolver().query(Browser.BOOKMARKS_URI, proj, sel, null, null);
mCur.moveToFirst();
@SuppressWarnings("unused")
String title = "";
@SuppressWarnings("unused")
String url = "";
if (mCur.moveToFirst() && mCur.getCount() > 0) {
boolean cont = true;
while (mCur.isAfterLast() == false && cont) {
title = mCur.getString(mCur.getColumnIndex(Browser.BookmarkColumns.TITLE));
url = mCur.getString(mCur.getColumnIndex(Browser.BookmarkColumns.URL));
// Do something with title and url
mCur.moveToNext();
}
}
Ajoutez également des autorisations en utilisant
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />