← Back to context

Comment by wrs

3 months ago

Did I interpret correctly that this sends a push notification every minute telling your phone to download a new code? If so, that seems like a battery problem…

The article mentions they need to be refreshed every week, so I'd guess at most once a week.

  • I think ideally you'd do it maybe every day or so, so that if the user goes offline for a while, or the server you're running goes down or something, the pass will continue to work for at least 6 days. It buys you a lot of time to fix things.

  • The RefreshAt is a week, but if the code is actually valid for a week, it's not clear why a simple screenshot of the code didn't work.

You can send background push notifications which are delivered when the phone is ready for them. They don't deliver when the phone is low battery or in low battery mode. It's specifically made to reduce battery consumption.

Higher priority push notifications require a user visible UI element and ca be delivered regardless of certain low power situations.

  • It sounds like this only helps power consumption after you've already run low on power. Seems like processing frequent notifications would accelerate your progress toward that low power state.

    • Yeah but many people turn on Low Power Mode manually every time they unplug or via automation at a high threshold.

  • > Higher priority push notifications require a user visible UI element

    The QR code for a pass sure sounds like a priority user visible UI element.

    • Only if it’s visible, from the sound of it these are background notifications so that the QR code can be ready if you open the pass.