Home > Net >  Is it possible to display Android notifications with the absolute date?
Is it possible to display Android notifications with the absolute date?

Time:03-15

I am displaying the system notifications right now using notificationBuilder.setShowWhen(true) and notificationBuilder.setWhen(millis). But when the time is recent I get the relative date format like on the screenshot.

Is it possible to always display the date in the absolute format like "hh:mm"?

enter image description here

CodePudding user response:

That is part of the system-supplied UI. Developers cannot control it. How it renders (relative/absolute, etc.) will vary by OS version and may vary by device model (if manufacturers tweaked how notifications render).

  • Related