citiususc / calendula

An Android assistant for personal medication management
https://citius.usc.es/calendula/
GNU General Public License v3.0
206 stars 106 forks source link

Insistent alarms are difficult to silence #62

Closed angelpinheiro closed 6 years ago

angelpinheiro commented 7 years ago

When the insistent mode is enabled and an alarm sounds, it doesn't stop until the notifications panel is opened, even if the user opens the app. This is not a common problem, but it has occurred in several devices so far.

rrodrigueznt commented 7 years ago

Just one tip: when Ángel says "even if the user opens the app", I think it is better to say "even if the user opens the app and marks the dose as taken".

angelpinheiro commented 7 years ago

WIP on the the feature-insistent-notifications branch. With the new approach implemented on 6a739c5f047792104bf229fc48ebf1f894d415ab we will no longer depend on the default insistent notification flag, whose implementation by different manufacturers seems to be causing the problem. Instead, we will display a notification activity over the lock screen with sound and vibration when this option is enabled.

rrodrigueznt commented 7 years ago

It will be great to try this new implementation as soon as possible! Please, Ángel, could you point me in the right direction? Is it possible to download and install some kind of overnight release before the new beta is released? Thanks!

angelpinheiro commented 7 years ago

Thank you for offering to try it! I will upload here an alpha version with these changes. Note that migration from earlier versions is still not resolved, and it may be necessary to re-install the app (before install and/or with later versions) to make it work properly :neutral_face:

rrodrigueznt commented 7 years ago

OK! But I'm afraid that I don't know what does "reinstall" mean while working with Android APPs! Looking for your instructions! Thanks!

angelpinheiro commented 7 years ago

Finally, I decided to compile the alpha version with a different application ID. This means that you can install both versions (Google Play and alpha) on the same device, and it is not necessary to uninstall the previous version. I think this approach can be useful for letting other users test nightly builds or specific features without compromising their "official" Google Play version data. I'm updating the build mechanism to get this integrated in the normal build process (to facilitate similar builds in the future) and I will upload the first alpha version ASAP.

One important thing: If you do not want to have a mess of alarms of both apps, you will need to disable the notifications in the Google Play version of Calendula (Uncheck "Med intake alarms" in the app Settings).

angelpinheiro commented 7 years ago

There you go: (link deleted by repo admins. Reason: this alpha is unstable and has served its purpose already)

rrodrigueznt commented 7 years ago

Installed! Thanks! I'll play with it and report back ASAP! Just one doubt: may I remove the downloaded medicine database once installed?

angelpinheiro commented 7 years ago

Yes, you can! I just opened a new issue #63 to take care of that.

rrodrigueznt commented 7 years ago

Done! Great to see #63 created and assigned! 👍 The behaviour of the new alarm system is close to perfect! Just one tip: if the device is looked, it shows a full-screen image where only a dismiss button is available. When you click on it, you must unlock the terminal and mark it as done or postpone it. Could it be possible to re-schedule it from this screen without unlocking the phone? Scenario: when the alarm sounded I was in a meeting, it would have been great to postpone it with just two clicks! Thanks!

angelpinheiro commented 7 years ago

Glad to see that you like it! The stop button of the alarm screen only stops the alarm, but doesn't affect to the intake status nor the status bar notification. If you have configured the alarms to repeat every 15 minutes, it will repeat after that period even if you have stopped the "insistent notification" sound. Even so, I think adding some more buttons for delay (15min, 30min, 1hour for example) can be useful for situations like you are talking about.

We could have also added info about which drugs to take and doses, but we decided not to do that because it could become a privacy issue, as this screen would be visible for others without unlocking the phone.

Thanks for the feedback!

rrodrigueznt commented 7 years ago

OK, I get the point! +1 for the buttons and +1 for hidden the medication until the device is unlocked! Thanks!

symbolisch1234 commented 7 years ago

re: privacy, there is a setting called "hide sensitive notification content", which shows the content only after phone unlock. see https://support.google.com/nexus/answer/6111294?hl=en

this is relevant also to #73

AlvaroBrey commented 6 years ago

Insistent notifications have been completely reworked in release 2.5.1, and now show a full-screen alarm (with alarm ringtone) until the user stops it or opens another app.

This issue is therefore no longer relevant, and I shall be closing it.

Give the new insistent alarms a spin and see if they work for you! Thanks for all the feedback.