title: How to develop an android app that retrieves all the browsing information using VPN api?
body: <p><strong>Note: The app that I am trying to build will go into production. This is not for just practicing</strong></p>
  <p>I am trying to develop an app that needs to retrieve the websites visited by the user on an android device. Additionally, I want to retrieve the content of the website and specifically ad content to find the ads seen by the user.</p>
  <p>I tried to get the ad content seen by the user using Accessibility. But the accessibility API is not returning the ad content seen in the browser. Even tracking the browsing history didn't work all the time.(I tried retrieving the browsing history from the value of the browser address bar using Accessibility API).</p>
  <p>I know that all these can be done by using our own custom browser and making it default in the user's phone using Device administrator privilege.</p>
  <p>But I want to try intercepting the request using VPN API. I used VPN API to connect to a proxy server(I have set up the proxy using <strong>mitm</strong> proxy tool. I even tried with <strong>http-toolkit</strong> which provides its own android app) which intercepts &amp; decrypts all the browser requests by installing a root CA certificate in the user certificate store. Just a DNS interception doesn't work for me as I also want to get the request and response body.</p>
  <p><strong>But I want to know if it is possible to decrypt and see the data of an HTTPS request &amp; response body locally in the android device itself. If it's possible I want to know some technical bits of it.</strong></p>
  <p><strong>I am also looking for any solutions other than those mentioned in this question</strong></p>