How to continue using Browser Bookmark Changes in Android 6.0 (API 23)
Asked Answered
L

1

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?

Lansing answered 25/10, 2015 at 21:17 Comment(4)
"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).Alliterate
@Alliterate 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? #13137839Lansing
"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.Alliterate
@Alliterate thanks, I guess you can add your response as the answer.Lansing
A
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).

Alliterate answered 25/10, 2015 at 21:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.