3

I've got a Progressive web app and packaged inside an android WebView. I'd like it to work offline. How do I access the cache/service worker and make it happen?

1 Answer 1

1

This is simple - use the ServiceWorkerController instance. Although it only works on Android N and up so make sure to tell your users to install your site as a PWA for these users.

https://developer.android.com/reference/android/webkit/ServiceWorkerController

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the link, but how do I use the instance specifically? I'm not really sure about that, the docs don't really tell me how.
stackoverflow.com/questions/45773104/… shows an example and explains how it works so that should work fine for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.