Notification delayed after upgrading flutter_local_notifications
with desugaring from Google Play Store
#162
Labels
bug
Something isn't working
Background
In September, I upgraded flutter_local_notifications package to its latest (version
11.0.0
) from version9.9.0
and released the app in September Update.Not long after that, I received an email from crashlytics alerting me about a trending issue causes by
FlutterLocalNotificationsPlugin.java
. Also, one user complained about the notification getting delayed on his/her phone. This issue is recorded in #142What went wrong is, version
10.0.0
of the plugin's has switched the implementation ofzonedSchedule()
to using desugaring instead of the ThreeTen Android Backport library. There are required steps that I should make in Android Setup but I missed that.Because I didn't have much time to make changes and test it out, I reverted this app to its previous version and republish the hotfix.
...
In November, I make another attempt to upgrade the plugin to its latest release, version
12.0.3
. This time I did not forgot to read the README and add missing requirement to Gradle file etc. I published a pre-release version to test it out to see if issue in #142 reoccur again.Fortunately, no issues were found during the testing, Notification & azan is working like charms. So, I'm confident enough to make a new production release on the Google Play Store. [View releases]
I downloaded the app from Google Play Store. However, since yesterday, I noticed that sometimes the notification is delayed by a few minutes (just like what happened in #142). I'm so confused (and flabbergasted) because the delay doesn't happen, not even once while testing. Surprisingly, no users have reported anything to me.
Triage report
I downloaded the same releases (
.apk
) from GitHub while keeping the app from Play Store side by side. (Had to use APK Editor to change the package name so it doesn't cause conflict)Version 2.7.1
Time notification should appear: 7.03 pm
Device: Redmi Note 11
Android version: 11
The time on the top displays when the notification is showing
We can see that the sideloaded is OK ✅ while the Play Store app is NOT OK ❌
Since this doesn't happen in previous release, I blame the desugaring migration of the plugin.
But things are getting more confusing when I ran this test on another device, YES Altitude 4, running Android 11. I installed the Play Store version, but it works as expected (the azan was on time).
Conclusion
To reproduce this issue, you:
There are several issues on notification delayed on other phones, as reported in #115 etc. But those issues were not reproduced by me. So I'm not sure those issues are related to this one or not.
The text was updated successfully, but these errors were encountered: