HTML5 Notifications timestamp?

Hi, I’ve just got the HTML5 push notifications working but on my Android (7.0) phone there’s something missing compared to other notifications: Time!
When I get a notification from other apps (incl. mail apps, chat apps, Tasker etc) it gets annotated with the time the notification was received. Is there any way to get this for HTML5 notifications? I can’t find anything relevant to this in the parameter documentation linked from the component documentation.

I did some digging and it seems Chrome didn’t implement setShowWhen (https://stackoverflow.com/questions/37118470/how-to-add-timestamp-on-the-android-notification) when the default behaviour was changed in Android N… :disappointed:

This looks like the current implementation in Chrome: https://codereview.chromium.org/1388483002/patch/100001/110001

I guess the only workaround at this point is to include the time in the notification message…

1 Like

Well, I got it filed as a bug in Chromium so we’ve got that going for us which is nice.

https://bugs.chromium.org/p/chromium/issues/detail?id=755143