Getting callbacks from the WebViewClient

Is there anyway on Android to be able to override the methods shouldOverrideUrlLoading and onPageFinished ? I need a hookin to those methods to be able to set a session cookie at the right time. Is there a way I can “inject” my own WebViewClient or how can I do this? I can not use getBridge().getWebView().getWebViewClient() because my app need to run on API < 25. Had it been a pure Android app I would have extended WebViewClient and injected that into the WebView, but since you already are doing this I would break Capacitor by injecting my own WebViewClient. Is it possible somehow to do this?

Thank you