Friday, July 5, 2013

[android help] Delete Android Browser Boookmark


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

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...