Android Browser.BOOKMARKS_URI does not work on all devices. How to find out the correct uri for a given device?

后端 未结 2 794
南笙
南笙 2020-12-10 05:53

I am trying to use Android Browser.BOOKMARKS_URI to CRUD device bookmarks from within my app ( https://play.google.com/store/apps/details?id=com.elementique.web )

It

2条回答
  •  一整个雨季
    2020-12-10 06:52

    This is the query to search the bookmarks;

    cursor = mContentResolver.query(Browser.BOOKMARKS_URI, BOOKMARKS_PROJECTION,
                    Browser.BookmarkColumns.BOOKMARK + " == 1" + 
                        " AND LOWER(" + Browser.BookmarkColumns.TITLE + ") LIKE ?", 
                    new String[] { searchText + "%" },
                    Browser.BookmarkColumns.TITLE + " ASC");
    

提交回复
热议问题