0 Replies - 2235 Views - Last Post: 22 September 2010 - 03:57 AM

#1 Guest_liorry*


Android Adding a bookmark using ContentResolver instead of saveBookmar

Posted 22 September 2010 - 03:57 AM


For now, on Android 2.2, adding a new bookmark using Browser.saveBookmark() is force closing after adding the bookmark.
See issue http://code.google.c...detail?id=11291 .

Because of this and because I want to edit the looks of the Add Bookmark dialog, I'm trying to use ContentResolver() to add a new Bookmark.
(Managed to delete and edit a bookmark using ContentResolver so it works...)

When I run the method I wrote, it force closes for "Unknown URL" which is an understandable reason :)

The problem is I can't seem to find the solution on what the right URI is.


Uri bUri = Uri.withAppendedPath(Browser.BOOKMARKS_URI, Browser.BookmarkColumns.CREATED);
Uri bUri = Uri.withAppendedPath(Browser.BOOKMARKS_URI, Browser.BookmarkColumns.BOOKMARK);

and more... nothing helped...

on the edit I use Uri bUri = Uri.withAppendedPath(Browser.BOOKMARKS_URI, bookmark_id); where bookmark_id is the ID of the bookmark being edited.

Anyone knows what is the right URI to add a bookmark?

Appreciate the help!

Is This A Good Question/Topic? 0

Page 1 of 1