tgamauf / spritstat

SPRITSTAT is a service that collects fuel price statistics for user-specified locations in Austria.
https://sprit.thga.at
MIT License
1 stars 0 forks source link

Notify useres on low prices #82

Open tgamauf opened 2 years ago

tgamauf commented 2 years ago

Multiple ways to archive this - easiest is to simply send an email. An possible alternative would be to register the website as app and then send push through browser: https://stackoverflow.com/questions/33687298/how-to-send-push-notification-to-web-browser#33976929 - needs investigation. In any case, user must opt-in.

tgamauf commented 2 years ago

Can send push messages via platform specific services:

For both it is probably necessary to make the webapp install-able and the user must install it in order for push messages being shown even if the browser is closed: https://web.dev/install-criteria/

tgamauf commented 2 years ago

Should notifications be sent separately for each location? Over all locations? Let the user choose?

tgamauf commented 2 years ago

What should be the trigger for sending a notification? If prices are going down it could be lower every few minutes. We definitely need some kind of threshold or a minimum wait time between messages.

tgamauf commented 2 years ago

Good overview over push services: https://www.smashingmagazine.com/2022/04/guide-push-notifications-developers/

Better to use an intermediary instead of Google/Apple push services as they change with reach release, which would require additional maintenance. Services:

tgamauf commented 2 years ago
tgamauf commented 2 years ago

Possible metrics:

tgamauf commented 2 years ago

Can send push messages via platform specific services:

For both it is probably necessary to make the webapp install-able and the user must install it in order for push messages being shown even if the browser is closed: https://web.dev/install-criteria/

If push works in the first place for „installed“ webapps, then it is probably a good idea to give the user the choice of wich channel to use.

tgamauf commented 2 years ago

Promote install of webapp on mobile:

tgamauf commented 2 years ago

Push messages do not work yet as of iOS 15.4. However, the API is already implemented, so it might be that it will work in one of the next releases. https://firt.dev/notes/pwa-ios/