Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Any experience in combining this with CapacitorJS? #25

Open
johannesjo opened this issue Jan 12, 2025 · 1 comment
Open

Any experience in combining this with CapacitorJS? #25

johannesjo opened this issue Jan 12, 2025 · 1 comment

Comments

@johannesjo
Copy link

I hope it is alright, that I am asking my question here.

I am building an application (https://github.com/johannesjo/super-productivity) with capacitorjs and I am overwriting the webViewClient like so:

       bridge.webViewClient = object : BridgeWebViewClient(bridge) {
           @Deprecated("Deprecated in Java")
           override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
               return webViewRequestHandler.handleUrlLoading(view, url)
           }

           override fun shouldInterceptRequest(
               view: WebView?,
               request: WebResourceRequest?
           ): WebResourceResponse? {
               Log.v("TW", "Regular Request Intercepting request: ${request?.url}")
               val interceptedResponse = webViewRequestHandler.interceptWebRequest(request)
               return interceptedResponse ?: super.shouldInterceptRequest(view, request)
           }
       }

Does anybody have any experience with using this module together with capacitorjs. I am afraid that just using RequestInspectorWebViewClient will break all the internal functionalities of capacitorjs.

@acsbendi
Copy link
Owner

Well, have you tried using them together? I don't really see a reason why it would break.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants