How to block some url in android browser?

How to block some URL (site) in the default browser in the Android browser ???

I want to restrict user to access some url which are black listed. 

eg. If I want to block facebook, then the built-in application browser will not get access to this facebook site.

Thanks in advance!

+4
source share
3 answers

Do you want to block some websites on the user device by allowing them to install the application?

If so, it will only work if they are rooted. If they are, you can add the URL entry to the hosts file and redirect it to another IP address (for example, 127.0.0.1). But since they should be implemented, they are likely to receive a popup asking them to allow root access. This may cause some suspicion from the user.

On a device that is not deployed, it is not possible to prevent a standard browser from accessing a specific website by installing the application.

+6
source

You cannot prevent a user from using his browser on his device to access any site.

If you want to do this, make your own browser and replace it on your device (perhaps this is not possible without root).

+1
source

There is work that uses the VPN service to monitor and filter all traffic.

An example of this is the NetGuard project:

https://github.com/M66B/NetGuard .

Of course, the user must give his permission to allow this service to take control of traffic. And on some systems, some system applications are not aimed at this service (I noticed that Samsung web browser traffic is not sent through the system VPN).

0
source

Source: https://habr.com/ru/post/1489032/


All Articles