1

I want to get History of sbrowser? I try used "com.sec.android.app.sbrowser.browser/history" but it is not working.

final Uri uri = Uri.parse("content://com.sec.android.app.sbrowser.browser/history");
final Cursor c = getContentResolver().query(uri, null, null, null, null);
if (c!=null && c.moveToFirst()) {
  do {
    System.out.println(c.getString(c.getColumnIndex("URL")));
  } while(c.moveToNext());
}
AskNilesh
  • 67,701
  • 16
  • 123
  • 163

2 Answers2

0

I had a similar issue and I found that the correct URI is

content://com.sec.android.app.sbrowser.browser/bookmarks

Check out this post Android Browser.BOOKMARKS_URI does not work on all devices. How to find out the correct uri for a given device?

anim8r
  • 11
  • 3
0

The other way to get the history

Cursor mycur = managedQuery(Browser.BOOKMARKS_URI, Browser.HISTORY_PROJECTION, null, 
null, null);
    int count = mycur.getCount();
    mycur.moveToFirst();
    if(mycur.moveToFirst() && count>0)
    {
        while(count>0)
        {
            Log.e("title",mycur.getString(Browser.HISTORY_PROJECTION_URL_INDEX));
            mycur.moveToNext();
        }
    }

You can check below also some other answers

Get browser history and search result in android

Cyrille Con Morales
  • 918
  • 1
  • 6
  • 21