breautek commented on issue #1693: URL: https://github.com/apache/cordova-android/issues/1693#issuecomment-1946651464
Ok thank you, that confirms that it still doesn't work "out of the box". Glanceful reading, I'm guessing it's because the native needs to handle service worker registration using [ServiceWorkerClient](https://developer.android.com/reference/android/webkit/ServiceWorkerClient)[ServiceWorkerController], (https://developer.android.com/reference/android/webkit/ServiceWorkerController), and [ServiceWorkerWebSettings](https://developer.android.com/reference/android/webkit/ServiceWorkerWebSettings). Cordova doesn't currently do this. The good news is the above classes were added in API 24, which fits within our minimum API level, so if a PR can be crafted and tested then we could potentially roll it into our 13.x release. However, to re-iterate the service worker registration should probably be in the origin and context of webview asset loader (e.g. `https://localhost` / internal storage). In fact, MDN states that service workers must be ran in a secure context, thus it needs to go through the webview asset loader and the asset loader must be configured to use the https protocol. Even if the security implications are ignored, there might be technical limitations in registrating the service worker from external storage. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org