I want to get last visited URL in chrome and other browser's. I am able to get Last URL in android Native browser. I use following code for this -
Cursor cur = getContentResolver().query(Browser.BOOKMARKS_URI,
new String[] { Browser.BookmarkColumns.URL }, null, null,
BookmarkColumns.DATE + " DESC");
if (cur != null && cur.getCount() > 0) {
cur.moveToFirst();
String url = cur.getString(cur
.getColumnIndex(Browser.BookmarkColumns.URL));
cur.close();
return url;
} else {
if (cur != null) {
cur.close();
}
return null;
}
But this code does not work on other browser's like chrome. How can I get Last visited url in chrome and other browsers.
Thanks in advance.