它对我有用

Uri BOOKMARKS_URI = Uri.parse("content://browser/bookmarks");

String TITLE = "title";

String VISITS = "visits";

String BOOKMARK = "bookmark";

ContentResolver resolver = getContentResolver();

try {

Log.i("DEBUG_", "ContentResolver");

Cursor c = resolver.query(

BOOKMARKS_URI,

null,

null, null, null);

c.moveToFirst();

Log.i("DEBUG_", "Cursor : " + c.toString());

resolver.delete(BOOKMARKS_URI, "bookmark == 1", null);

Log.i("DEBUG_", "ContentResolver delete ");

} catch (IllegalStateException e) {

Log.i("DEBUG_", "IllegalStateException " + e.getMessage());

e.printStackTrace();

}

要么

Cursor faves = managedQuery(BOOKMARKS_URI,

requestedColumns,

null, null, null);

该文章版权属于洋莞成
摘录自:https://blog.csdn.net/weixin_32965939/article/details/117615191

相关文章:

猜你喜欢
热门标签