-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Android wrong notification time #71
Comments
So the notification appears at the right time but the OS/notification reports the incorrect time on when the notification occurred? Also just to confirm its the schedule method you're calling right? |
I was about to bring this up too. I have the same issue it is when I try to use the schedule method. Even with your example the notification displays the incorrect time but it does occur at the correct time. |
@MaikuB Yes exactly! These notifications came up like 1 - 2h ago but show the time when I scheduled them. |
Yep was able to repro. Looks like it's due to the fact the notification got built before it got scheduled so I'll have to change the process so that it's only built right before displaying it. It's a relatively easy fix that will only apply for notifications that get scheduled in the next release. This would make it easier to fix issues going forward as not many details of the Notification class can be modified and Google has had history of deprecating fields that they are set via the builder. For notifications that had already been scheduled I'll add code to modify the Notification object so the correct time information is displayed via this field but I'll eventually do another release to remove that logic. |
Sweet, when do you think this will be fixed and pushed? |
Should be up now. Looks like my PR automatically closed the issue but I've reopened it, try it out and let me know how it goes |
Will the code be used like before or does something need to be added to this:
|
Code will work as before. It's just what happens behind the scenes that changed |
Having said that, I'll eventually be exposing this that controls if that information is displayed. Google is changing the behaviour so displaying that information is opt-in now |
yeah, seem like it works for me now, thanks! |
Sorry for resurrecting this older thread. I'm finally looking do what I mentioned where I'd remove the kludge put when I mentioned the following
I'm looking to do a beta release of the plugin so given how long ago this has been (i.e. before the plugin was more widely used), how hacky it is and how it can lead to making the plugin more difficult to maintain, I wanted to give a heads up on my intentions should anyone have feedback on that |
So this works correctly on IOS but not on Android. The problem is that when I've used a one-time notification that will fire in, for example, 20h. When the notification pops up it says that notification came 20h ago and not now.
To clarify. I set a notification in 20h. When 20h has gone by and the notification appears it says 20h on the notification (the time when the notification appeared). On IOS, however, it displays it normally so it won't say 20h but more like 1 min etc
The text was updated successfully, but these errors were encountered: