-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Documentation] Document how to modify the WebViewClient #2751
Comments
Sorry but this is not a feature we want to "advertise", we mainly did because of you (quasar) were overriding the WebViewClient and breaking the plugins because of that. For using it, instead of doing
and your |
Thank you so much for the code snippet! It worked great, but I had to replace |
Sorry, should be BridgeWebViewClient, not WebViewClient, updated the comment. |
A big "thank you!" from Quasar team for guiding us! |
@jcesarmobile In the template app for android, MainActivity calls BridgeActivity.init(), which creates a new Bridge with new default BridgeWebViewClient. new Bridge() also calls load on the WebView, with the app url from config. If custom WebViewClient is set before init it gets overwritten. If set after init, it doesn't get set until after the initial load request. This is fine for events triggered on response from server, ie onReceivedSslError or shouldOverrideUrlLoading but not for ones called prior to request, ie shouldInterceptRequest. Is there a better place to put this?
My use case is loading via server url to an authenticated server, and wanting to set custom Authorization header on request to specific urls. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
#2477 was merged without any documentation on how to modify the
WebViewClient
, making it difficult to use without a decent amount of Java/Android development experience. I want to enable self-signed https support like in #2271. The PR didn't get merged, instead I was pointed at #2230, which was fixed by #2477, yet no documentation was added (afaik) about how to use it. If someone could either document how to modify the webview or how I could specifically solve the https self-signed certificate problem that would be awesome.The text was updated successfully, but these errors were encountered: