How to use service workers in Cordova Android app?

After digging deep into this issue, I conclude that there is no support for Service workers in Android as it blocks service workers from HTTP or file protocols.

Also the support of Service worker in Ionic framework do not clearly state that it is not supported in hybrid mobile apps. It’s kind of misleading too as in this case. Ionic’s Service Worker support comes into picture only in case of Progressive Web App and not in hybrid mobile app as mentioned in their official blog

Adding to the above info, most of the functionality that can be achieved by using Service Workers are already available as part of plugins like push notification plugin which should be suffice in most cases.

The bottom line is that the Service Workers are not supported in Cordova Android as well as in Ionic framework. For more info, check out the following link

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)