I'm upgrading some legacy Cordova 2.x and 3.x apps to version 5.1.0. In the old projects the WebView was customized using the now gone CordovaChromeClient
and CordovaWebViewClient
classes.
Is there a replacement for these classes in the new API?
In particular, I'd like to:
- Set a higher database quota for SQLite.
This was done in the old times calling
WebView.setWebChromeClient
and passing as parameter an instance ofCordovaChromeClient
with itsonExceededDatabaseQuota
method overridden. - Override URL loading.
This was done in Cordova 3.x and lower calling
WebView.setWebViewClient
and passing as parameter an instance ofCordovaWebViewClient
with itsshouldOverrideUrlLoading
method overridden.
The old
CordovaWebViewClient
is now theSystemWebViewClient
The old
CordovaChromeClient
is now theSystemWebChromeClient
To get the
SystemWebView
use the getView and cast it