I have a project developed in Eclipse. Now I have to make some changes in it and I am not using Eclipse now.
But after creating the same project in Android Studio I am not able to use
Browser.BOOKMARKS_URI
Browser.BookmarkColumns.BOOKMARK
Browser.BookmarkColumns.VISITS
Browser.clearHistory(getContentResolver());
UPDATE
It shows following errors:
Cannot resolve: "BOOKMARKS_URI"
Cannot resolve: "BookmarkColumns"
Cannot resolve: "clearHistory()"
Please help me...
use this instead of accessing directly from browser Because Once i had the same issue and solved it by this hope it will help you
public final Uri BOOKMARKS_URI = Uri.parse("content://browser/bookmarks");
public final String[] HISTORY_PROJECTION = new String[]{
"_id", // 0
"url", // 1
"visits", // 2
"date", // 3
"bookmark", // 4
"title", // 5
"favicon", // 6
"thumbnail", // 7
"touch_icon", // 8
"user_entered", // 9
};
public final int HISTORY_PROJECTION_TITLE_INDEX = 5;
public final int HISTORY_PROJECTION_URL_INDEX = 1;
Try this alternative way for those who still didn't found a way to get browser history:
public static final Uri BOOKMARKS_URI = Uri.parse("content://browser/bookmarks");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With