nightscout / Trio

MIT License
49 stars 154 forks source link

Alarmtone when the app is killed #192

Open sfriedriszik opened 2 months ago

sfriedriszik commented 2 months ago

Would it be possible to play an alarm sound when the app is killed? Some users like to clean up the task list and the app accidentally gets killed. The Libre3 app has such a function. This has proven to be so beneficial.

Sjoerd-Bo3 commented 2 months ago

Just a train of thought: could this be done with Critical alerts? IMG_0691

LiroyvH commented 2 months ago

@Sjoerd-Bo3 Aren't those reserved for apps with a special entitlement you have to request with Apple? -edit- Yup, they are: https://developer.apple.com/documentation/usernotifications/unauthorizationoptions/criticalalert Critical alerts require a special entitlement issued by Apple. So I'm afraid we can't just implement that (apparently it isn't even issued for demo purposes :o).

However, that aside: xDrip4iOS triggers an alert like this. It fires a notification that the app is inactive and it plays a sound. Even if you have manually swiped up the app to kill it, it'll do this. Heck, I think it was exceptionally difficult to disable when it was my intention to kill the app - right up to simply revoking its notification permissions. :') Maybe inspiration could be taken from their code.

Sjoerd-Bo3 commented 1 week ago

hey 👋 - silence for 30 days 🤐 ... anybody? triage is required!