7

In my app, I have been using some of these function that are coming up as unknown when using Android 6.0 (buildToolsVersion "23.0.1"), the functions are: Browser.getAllVisitedUrls(getContentResolver());, BookmarkColumns.URL, etc.

How can I use the same functions going forward with Android 6.0.

In the list of things that have changed in Android 6.0, I see the following:

Browser Bookmark Changes

This release removes support for global bookmarks. The android.provider.Browser.getAllBookmarks() and android.provider.Browser.saveBookmark() methods are now removed. Likewise, the READ_HISTORY_BOOKMARKS and WRITE_HISTORY_BOOKMARKS permissions are removed. If your app targets Android 6.0 (API level 23) or higher, don't access bookmarks from the global provider or use the bookmark permissions. Instead, your app should store bookmarks data internally.

What does this exactly mean? **Instead, your app should store bookmarks data internally**???

I was accessing the history of websites (with explicit user permission of course) visited using the Chrome Browser app, how to continue doing that?

Community
  • 1
  • 1
user1406716
  • 9,092
  • 22
  • 91
  • 149
  • 1
    "How can I use the same functions going forward" -- you don't. "WHat does this exactly mean? **Instead, your app should store bookmarks data internally**???" -- if you were using the bookmarks provider for storing your own bookmarks (e.g., you wrote your own Web browser), store your bookmarks in your own data store (e.g., a SQLite database). – CommonsWare Oct 25 '15 at 21:23
  • @CommonsWare thanks, so this means that getting Browser history of Chrome app is not possible? That kills a very useful feature in my app. So this is not possible anymore? http://stackoverflow.com/questions/13137339/can-we-get-chrome-browsing-history-bookmarks-in-our-android-app – user1406716 Oct 25 '15 at 21:27
  • 2
    "so this means that getting Browser history of Chrome app is not possible?" -- at least not through the Android SDK. I have no idea if the Chrome team is exposing the browser history through some other documented and supported public API. – CommonsWare Oct 25 '15 at 21:29
  • @CommonsWare thanks, I guess you can add your response as the answer. – user1406716 Oct 25 '15 at 21:41

1 Answers1

7

How can I use the same functions going forward with Android 6.0.

You can't, in terms of the Android SDK.

What does this exactly mean? "Instead, your app should store bookmarks data internally"???

If you were using the bookmarks provider for storing your own bookmarks (e.g., you wrote your own Web browser), store your bookmarks in your own data store (e.g., a SQLite database).

(and, ideally, write some code to do that now, and ship it, so users whose devices are upgrading to Android 6.0 are not locked out of the bookmarks you put into the Bookmarks provider)

so this means that getting Browser history of Chrome app is not possible?

At least not through the Android SDK's Browser provider. I have no idea if the Chrome team is exposing the browser history through some other documented and supported public API. The same holds true for any other Android Web browser (e.g., Firefox).

CommonsWare
  • 910,778
  • 176
  • 2,215
  • 2,253