httpdispatch / MissedNotificationsReminder

Periodical sound reminder for missed notifications in Android OS.
74 stars 22 forks source link

One time sound didn't play until I went to clear the notification #44

Open jay opened 5 years ago

jay commented 5 years ago

I have been using Missed Notifications Reminder 1.1.19 on Android 6.0.1 LG Tribute HD for about 4 months to remind me of a proprietary app's notifications, some of which are silent. For the most part it has functioned as intended but there were a few times that I felt like maybe it took longer than the interval to notify me (1 minute), but it was very rare.

I started logging the notifications to confirm. Since then I've only observed one time while I was driving using Google Maps for directions I could see the missed notifications icon in the status bar but did not hear the sound. I waited several minutes, pulled over and pulled down the screen and I saw two notifications from proprietary app and one from missed notifications. I swiped away one of the proprietary app notifications and at exactly the moment I did that the missed notifications sound played.

In the notification log I saw Missed Notifications had two notifications, and I guess one replaced the other because I recall having seen only one in the notification pull down. (That may or may not be significant because the log shows that same behavior occasionally for a single proprietary app notification, though I hear the sound and it seems to be working.) I cannot show you all the detail but below is a redacted version. Basically from what I can tell the second notification from Missed Notifications seems to have been posted 5 minutes after the second notification from proprietary app.

{
  "packageName": [removed],
  "postTime": 1548175627618,
  "systemTime": 1548175627711,
  "offset": -18000000,
  "version": 12,
  "sdk": 23,
  "isOngoing": false,
  "isClearable": true,
  "when": 1548175627601,
  [removed]
  ...
}

{
  "packageName": "com.app.missednotificationsreminder",
  "postTime": 1548175627812,
  "systemTime": 1548175627851,
  "offset": -18000000,
  "version": 12,
  "sdk": 23,
  "isOngoing": false,
  "isClearable": true,
  "when": 1548175627756,
  [removed]
  ...
}

{
  "packageName": [removed],
  "postTime": 1548175660924,
  "systemTime": 1548175660954,
  "offset": -18000000,
  "version": 12,
  "sdk": 23,
  "isOngoing": false,
  "isClearable": true,
  "when": 1548175660909,
  [removed]
  ...
}

{
  "packageName": "com.app.missednotificationsreminder",
  "postTime": 1548175874082,
  "systemTime": 1548175874235,
  "offset": -18000000,
  "version": 12,
  "sdk": 23,
  "isOngoing": false,
  "isClearable": true,
  "when": 1548175872938,
  [removed]
  ...
}

Missed notifications is excluded from battery optimization. The reminder is set at 1 minute, repeat forever and create extra notification when reminders are active. Advanced is set to Ignore ongoing notifications (the proprietary app also has an ongoing notification that is properly ignored), Remind while screen is turned on, Do not remind while phone call is active, Ignore device audio profile.

Do you have any ideas what would cause this issue or how I can debug it further?

Thank you for creating this program it is very helpful.

httpdispatch commented 5 years ago

This is known issue (reminders are not exact by default). The Android ROM prevents app to wake device to frequently. If you want to have exact reminder intervals you may try to enable "Keep device awake" option in the advanced MNR app settings.

jay commented 5 years ago

Ok but that particular time it happened the device was awake though wasn't it? I was driving and using Google Maps and the screen was on and I could see the missed notifications icon from the time it showed until I pulled down the notifications.

httpdispatch commented 5 years ago

@jay App relies on android JobScheduler by default to schedule reminder jobs. However if you'll specify "Keep device awake" app will use internal timer instead of.

jay commented 5 years ago

Ok I'll give that a try, thanks.