Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification slightly delayed #14

Open
felixwiemuth opened this issue May 28, 2021 · 0 comments
Open

Notification slightly delayed #14

felixwiemuth opened this issue May 28, 2021 · 0 comments

Comments

@felixwiemuth
Copy link
Owner

Notifications are sometimes shown delayed when the device sleeps. The delays I observed ranged from a few seconds up to around 4:30 minutes. However, when turning the screen on after the reminder's due time, the notification shows immediately.

This also seems to be reproducible to some extend. The procedure I used is:

  • Schedule a reminder for 5 minutes ahead (or even with only 2 minutes ahead)
  • Around one minute before due time, turn screen off
  • Turn screen on a few minutes after due time or wait until the notification eventually comes

See also #13.

Using the app over months, I did not notice this often and there don't seem to be more severe delays.

Device, OS and version information

  • Device: Pixel 4a
  • OS: Android 11 (GrapheneOS RQ2A.210505.002.2021.05.19.06)
  • App version: 0.9.7, 0.9.8-alpha1 (not released)

Conditions

  • Battery optimization off for SimpleReminder
  • Energy save off
  • Battery 81% at due time
  • Flight mode
  • Wifi and Bluetooth off

Possible reasons

The app uses IntentService to show the notification when due. The documentation says:

IntentService will not work correctly when the application is in the background on the latest versions of Android.

The IntentService class was deprecated in API 30 (Android 11). It seems a bit strange that already when running on Android 11 it would fail to work correctly but this could be the reason for the delay.

Possible solution

I will change the implementation to not use IntentService which hopefully solves the problem.


If anyone experiences this or a similar problem, please comment and provide information about the circumstances (especially device and Android information).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant