customer: dream are managing their own resource cache.
They need to be able to have the webview respond to specific requests with resources that are available locally and are provided by the application.
On Android this can be done with WebViewClient#shouldInterceptRequest, one challenge there is that shouldInterceptRequest needs to synchronously return a WebResourceResponse, so the decision of whether to intercept the request, and what is the mime type encoding(and potentially some other metadata) has to be synchronous. The documentation does mention that the "method is called on a thread other than the UI thread", need to check if it's ok to block that thread briefly.
On iOS as far as I can tell there isn't a mechanism for doing this per-webview, though it is possible to override URL loading for the entire app by registering a custom NSURLProtocol implementation.
It looks like we might end up with different APIs for Android and iOS, where the iOS API isn't part of the webview (I'm not even sure if it belongs in the webview plugin)
customer: dream are managing their own resource cache.
They need to be able to have the webview respond to specific requests with resources that are available locally and are provided by the application.
On Android this can be done with WebViewClient#shouldInterceptRequest, one challenge there is that shouldInterceptRequest needs to synchronously return a WebResourceResponse, so the decision of whether to intercept the request, and what is the mime type encoding(and potentially some other metadata) has to be synchronous. The documentation does mention that the "method is called on a thread other than the UI thread", need to check if it's ok to block that thread briefly.
On iOS as far as I can tell there isn't a mechanism for doing this per-webview, though it is possible to override URL loading for the entire app by registering a custom NSURLProtocol implementation.
It looks like we might end up with different APIs for Android and iOS, where the iOS API isn't part of the webview (I'm not even sure if it belongs in the webview plugin)