R89Web View Client
This class is used to add the consent data to the url that is being loaded in the WebView. And Prevent the CMP to show up in the web, which would mean that the CMP is prompted twice.
For this we are injecting a script in the header of the web to load. This script is just setting a variable to true so the CMP doesn't show up. And also whenever we call a WebView.loadUrl we are adding the consent data to the url and overriding the load to load it again.
if you need to override shouldInterceptRequest override r89ShouldInterceptRequest instead.
Functions
This function is called when the web starts loading a url. look at WebViewClient.onPageStarted
The way to get notified when WebViewClient.onPageStarted is called
This will be called before the shouldInterceptRequest but we can't allow overriding shouldInterceptRequest because we need it to include cmp data when loading a web inside appHostName domain.
we are overriding the default behaviour to add the consent data to the url and load it again.