citiususc / calendula

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

Notifications don't work #161

Closed sandy-8925 closed 5 years ago

sandy-8925 commented 5 years ago

I have created schedules, but I never receive notifications for those schedules. I am using a OnePlus 5, with Android 9.0 (but had Android 8.1 until a few days ago).

sphh commented 5 years ago

Calendula has to be excluded from battery optimization and power manager as every app running in the background wanting to display notifications.

On my Android 8.1 I had to do the following:

  1. Open Settings, select Battery, click on the three vertical dots in the top right corner and select Battery optimization. Check if Calendula is in the list of Not optimized applications. If it is not, tap on Not optimized, select All apps. Scroll down to Calendula and tap on it. Select Don't optimize and Done. Go back to Settings by pressing the back button repeatedly.
  2. Back at Settings, select Smart Assistant, click on Power save manager and in the White list scroll down to Calendula and make the checkbox beside Calendula active.

If the procedure is a bit different on Android 9.0, please add it here.

@omideleayo, maybe you want to add this procedure to your FAQ #133 ?

sandy-8925 commented 5 years ago

My OnePlus device has some additional power management "features" that break expected Android behaviour.

I suggest disabling them, since it prevented Calendula (and other apps') notifications from working.

Edit: For OnePlus devices, open the battery optimization settings, click on the 3 dots in the top right, click on Advanced Optimization. Disable "Deep optimization" and "Sleep standby optimization".

sandy-8925 commented 5 years ago

My bug was due to OnePlus' power management changes that broke expected Android API behavior, so it's not a bug in Calendula.

After disabling OnePlus' power management features, Calendula now works correctly.

Note that I have not disabled Android's default battery optimization features.

I'll close this now.

sphh commented 5 years ago

Glad that it works now.