26

Till API Level 22 (i.e. till Lollipop), there has been a way to read History and Bookmarks from the Chrome app (as shown in this thread) using the permission com.android.browser.permission.READ_HISTORY_BOOKMARKS.

Now, in Android API=23 Marshmallow, since the entire Browser Bookmark system has been removed in Marshmallow (changes here), the above method does not work anymore.

Here is the thread that shows why this is not possible anymore.

In my research so far, I have not found good news. Google has definitely killed the System Bookmarks feature(here & here), question is if Chrome Browser would be exposing it in any manner?

Is there a replacement / way to read Bookmarks and History from Chrome (even Chrome specific would answer this question) going forward in Android Marshmallow?

Community
  • 1
  • 1
user1406716
  • 9,092
  • 22
  • 91
  • 149
  • Please do not confuse [tag:google-chrome] and [tag:google-chrome-app] – Xan Nov 03 '15 at 01:19
  • 1
    if you found out answer any time, please let me know. I've the same problem :) –  Nov 09 '16 at 13:03
  • Possible duplicate of [permission READ\_HISTORY\_BOOKMARKS is not working on API 23](https://stackoverflow.com/questions/46828417/permission-read-history-bookmarks-is-not-working-on-api-23) – Nawrez Oct 31 '17 at 09:34

2 Answers2

8

Contrary to the cited documentation, com.android.browser.permission.READ_HISTORY_BOOKMARKS is still defined by the framework, and can still be obtained by apps. Unfortunately, on Marshmallow and later, Chrome checks for a different permission, one that regular apps aren't allowed to obtain. For compatibility reasons, when that permission check inevitably fails, Chrome returns zero rows instead of throwing a SecurityException.

You can see the source code here:

query() calls hasReadAccess(), which calls hasPermission("com.android.browser.permission.READ_HISTORY_BOOKMARKS"), which on API >= M ignores the permission argument and instead checks for com.android.chrome.permission.READ_WRITE_BOOKMARK_FOLDERS. This permission is limited to system apps and apps signed with Google's key.

j__m
  • 8,784
  • 1
  • 26
  • 49
-4

You can view your history by typing

Chrome://history

As your URL.

Pirates19
  • 11
  • 1