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's working fine on most of the devices, but does not work on some :-(
On those devices, trying to use bookmarks leads to
java.lang.IllegalArgumentException: Unknown URL content://browser/bookmarks
I now understand that Boookmark Uri can be different than the AOSP default value (i.e. "content://browser/bookmarks").
Question:
How can I get the correct Bookmark Uri for a given device?
I already 'collected' the following URI
private static final Uri BOKKMARKS_DEFAULT = Browser.BOOKMARKS_URI; // = Uri.parse("content://browser/bookmarks")
private static final Uri BOKKMARKS_URI_CHROME = Uri.parse("content://com.android.chrome.browser/bookmarks");
private static final Uri BOKKMARKS_URI_SAMSUNG_S_ = Uri.parse("content://com.sec.android.app.sbrowser.browser/bookmarks");
Is it a way to 'list' all available content URI (content://...) on a devices? If yes, I could list them and search for occurrence of "/bookmarks" string and give a try with this URI.
Note:
I am currently in the process of creating a fallback mechanism if the app is not able to get a 'working' bookmark URI (i.e. my own Bookmark DB since I do need a bookmark feature in my app)