Delete Android Browser Boookmark
I'm trying to develop an android app that could delete android's built in browser bookmark. Here is my code
ContentResolver cr = getContentResolver();
try
{
Cursor c = cr.query(
Browser.BOOKMARKS_URI,
new String [] { Browser.BookmarkColumns._ID,
Browser.BookmarkColumns.BOOKMARK,
Browser.BookmarkColumns.VISITS },
"bookmark != 0",
null,
null);
c.moveToFirst();
cr.delete(Browser.BOOKMARKS_URI, null, null);
}
catch (IllegalStateException e)
{
e.printStackTrace();
}
The problem with the above code is it delelte's bookmark perfectly fine but along with bookmark it also deletes Browser History which it's not supposed to. Please help mein clearing this riddle, Thanks in advance.
.
stackoverflow.comm
No comments:
Post a Comment