How to enable Safe Search in my Android browser

后端 未结 3 877
太阳男子
太阳男子 2021-01-11 16:06

Requirement

I have requirement in my browser to enable/disable safe search while browsing.

On Google Safe Search Page

Block

3条回答
  •  猫巷女王i
    2021-01-11 16:41

    Add on to @Andy Developer answer, you can perform an Android version checking, if it is less than API 27, you could use the Safe Browsing API.

    To ensure your browser the best user experience, I would suggest you to implement the Update API and setup a local database. This is the common approach for browsers you can find in Play Store nowadays.

    From the Documentation:

    Update API (v4)

    The Update API lets your client applications download encrypted versions of the Safe Browsing lists for local, client-side checks of URLs.

    The Update API is designed for clients that require high frequency, low-latency verdicts. Several web browsers and software platforms use this API to protect large sets of users.

    If you are concerned about the privacy of the queried URLs or the latency induced by a network request, use the Update API.

    By doing this you can offer this features for both lower end user and high end user.

    Note: WebView have implemented Safe Browsing API in native, so it is just the same. If you want to implement Update API only instead of the answer proposed by @Andy Developer, it is still recommendable as it provides uniformity.

提交回复
热议问题