Hide time in Android notification without using custom layout

前端 未结 3 2216
隐瞒了意图╮
隐瞒了意图╮ 2020-12-09 02:25

In the bottom right corner of a standard Android notification is time (eg 12:00). Can I hide it without using custom notification layout?

3条回答
  •  一整个雨季
    2020-12-09 02:39

    For API level 17 and onward, the above accepted answer by Erwan is correct.

    For historical purposes, the answer below remains

    It is possible to do that.

    Try setting when to 0. For the few notifications that don't do that, it looks like thats what they do.

    Here's the general API reference.

    Here's a link to the ADB notification and search for private void updateAdbNotification()...

提交回复
热议问题