asked on
progressive web apps nowadays
hello
i have a few questions regarding nowadays progressive web apps. in thus context i need working message push when the applucation is not launched.
1/ back in the days, there used to be tools that could accept an url and turn a site into an app. i googled and found cordova and oracle's build tool which both feature similar behaviors. is there any simple tool you have experience with ?
2/ is there a way to define which browsing engine should be used or perhaps bundle a webkit or similar engine.
3/ what about ios push ?
4/ can you confirm a service worker will be spawned even though neither the browser or app is run on the phone
5/ is it possible to use my own site for push or is there some service worker limitation that prevents it from working unless some external service is used ?
6/ based on your experience, are push and camera access reasonably normalised or do i need to cope with multiple apis and if elses all over the place
thanks for your help
It required server side code or to use a service (service worker) like Firebase to send push notification.
https://firebase.google.com/
Ref https://firebase.google.com/docs/cloud-messaging/js/client
ASKER
i am currently considering a solution based on capacitor and vuejs gor the client side.
the server side is currently laravel but whatever exists does not seem very complicated to rewrite. i may decide either keeping the laravel part or a rewrite likely in nodejs.
based on my findings, i will answer some of my own questions. i am hoping to help future users with similar issues and possibly to stand corrected if i misinterpreted something
1/ canvas seems to allow that but is a paid tool. capacitor seems to allow the same with reasonable hassle
2/ this is not how webviews work. such features would rather be implemented with a flutter app which can be compiled from dart code
3/ current status is still a little unclear. as far as i gather, notifying the user works but pushing data in the background does not. anyway this is something apple is working on actively.
4-5/ service workers do not really just run. the push apis trigger the wakeups and there does not seem to be a way past that. some digging is requirzd as there may be alternative ways such as a tiler based wakeup that allows to do that
6/ capacitor takes care of that quite elegantly
I would say : Use what you already know and learn new things.
This way it save time and you will also learn new things.
ASKER
ASKER
actually, i was hoping for something that would run client side only using the same code for both the web site and mobile. i know vuejs can be used in that way for example though i have no direct experience.
is there anything that can be loaded as a simple client side library and does not involve server side rendering and messy communication with some nodejs backend. i had rather use something lightweight and non intrusive, handle api calls myself and keep front and back ends separated.