Issue metadata
Sign in to add a comment
|
Need to call setShowWhen() on notifications with a developer-provided timestamp |
||||||||||||||||||||||||
Issue descriptionDevelopers can provide a custom timestamp for Web Notifications by using the `timestamp` option when creating one. On Android versions prior to N, this would show the time on the notification toast itself. Since N, the default has changed to hide the time. When the developer explicitly provides a timestamp, we should call setShowWhen() to make sure it displays after all. (I'm erring towards *always* displaying the timestamp, which is what most other apps on my phone seem to do, but that's a separate discussion.)
,
Jan 8 2018
Taking this on.
,
Jan 9 2018
Notifications are created using createChromeNotificationBuilder(). Looking at the references for this function from notifications code, there are three invocations. Two of these (from StandardNotificationBuilder and CustomNotificationBuilder) do call setShowWhen(true). The third one (NotificationBuilderBase) doesn't do so. However, this one is showing notifications in sensitive situations like on the lock screen, and explicitly sets setShowWhen to false for Android L and M where notification timestamp is automatically shown. Is there a reliable way to repro this so I can test if this is still an issue? From Blame, I can see awdf@ made a change for Bug 778599 (https://chromium-review.googlesource.com/c/chromium/src/+/749403) where she changed code to always show timestamp. Is the ask here to show timestamp only when the developer has provided one?
,
Jan 9 2018
Tested it using https://tests.peter.sh/notification-generator Since Bug 778599 is the same issue and has been fixed, I'm duping this one to 778599. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by peter@chromium.org
, Aug 14 2017