Add time to all notification
This commit is contained in:
parent
d81f8e1f6f
commit
5a3491a4bb
2 changed files with 11 additions and 0 deletions
|
@ -59,6 +59,7 @@ public class ApiTwentyOnePlus {
|
|||
.setVisibility(Notification.VISIBILITY_PRIVATE)
|
||||
.setPriority(Notification.PRIORITY_HIGH)
|
||||
.setNumber(msgCount)
|
||||
.setWhen(System.currentTimeMillis())
|
||||
.build();
|
||||
|
||||
return notif;
|
||||
|
@ -100,6 +101,7 @@ public class ApiTwentyOnePlus {
|
|||
.setLights(ContextCompat.getColor(context, R.color.notification_color_led),
|
||||
context.getResources().getInteger(R.integer.notification_ms_on),
|
||||
context.getResources().getInteger(R.integer.notification_ms_off))
|
||||
.setWhen(System.currentTimeMillis())
|
||||
.setPriority(priority)
|
||||
.build();
|
||||
} else {
|
||||
|
@ -114,6 +116,7 @@ public class ApiTwentyOnePlus {
|
|||
context.getResources().getInteger(R.integer.notification_ms_on),
|
||||
context.getResources().getInteger(R.integer.notification_ms_off))
|
||||
.setPriority(priority)
|
||||
.setWhen(System.currentTimeMillis())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -139,6 +142,7 @@ public class ApiTwentyOnePlus {
|
|||
context.getResources().getInteger(R.integer.notification_ms_on),
|
||||
context.getResources().getInteger(R.integer.notification_ms_off))
|
||||
.setPriority(Notification.PRIORITY_HIGH)
|
||||
.setWhen(System.currentTimeMillis())
|
||||
.build();
|
||||
|
||||
return notif;
|
||||
|
@ -158,6 +162,7 @@ public class ApiTwentyOnePlus {
|
|||
.setLights(ContextCompat.getColor(context, R.color.notification_color_led),
|
||||
context.getResources().getInteger(R.integer.notification_ms_on),
|
||||
context.getResources().getInteger(R.integer.notification_ms_off))
|
||||
.setWhen(System.currentTimeMillis())
|
||||
.setPriority(Notification.PRIORITY_HIGH)
|
||||
.build();
|
||||
|
||||
|
|
|
@ -87,6 +87,7 @@ public class ApiTwentySixPlus {
|
|||
.setVisibility(Notification.VISIBILITY_PRIVATE)
|
||||
.setPriority(Notification.PRIORITY_HIGH)
|
||||
.setNumber(msgCount)
|
||||
.setWhen(System.currentTimeMillis())
|
||||
.build();
|
||||
|
||||
return notif;
|
||||
|
@ -106,6 +107,7 @@ public class ApiTwentySixPlus {
|
|||
.setCategory(Notification.CATEGORY_CALL)
|
||||
.setVisibility(Notification.VISIBILITY_PUBLIC)
|
||||
.setPriority(Notification.PRIORITY_HIGH)
|
||||
.setWhen(System.currentTimeMillis())
|
||||
.build();
|
||||
|
||||
return notif;
|
||||
|
@ -124,6 +126,7 @@ public class ApiTwentySixPlus {
|
|||
.setCategory(Notification.CATEGORY_SERVICE)
|
||||
.setVisibility(Notification.VISIBILITY_SECRET)
|
||||
.setPriority(priority)
|
||||
.setWhen(System.currentTimeMillis())
|
||||
.build();
|
||||
} else {
|
||||
notif = new Notification.Builder(context, context.getString(R.string.notification_service_channel_id))
|
||||
|
@ -134,6 +137,7 @@ public class ApiTwentySixPlus {
|
|||
.setCategory(Notification.CATEGORY_SERVICE)
|
||||
.setVisibility(Notification.VISIBILITY_SECRET)
|
||||
.setPriority(priority)
|
||||
.setWhen(System.currentTimeMillis())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -156,6 +160,7 @@ public class ApiTwentySixPlus {
|
|||
.setCategory(Notification.CATEGORY_MESSAGE)
|
||||
.setVisibility(Notification.VISIBILITY_PRIVATE)
|
||||
.setPriority(Notification.PRIORITY_HIGH)
|
||||
.setWhen(System.currentTimeMillis())
|
||||
.build();
|
||||
|
||||
return notif;
|
||||
|
@ -173,6 +178,7 @@ public class ApiTwentySixPlus {
|
|||
.setCategory(Notification.CATEGORY_MESSAGE)
|
||||
.setVisibility(Notification.VISIBILITY_PRIVATE)
|
||||
.setPriority(Notification.PRIORITY_HIGH)
|
||||
.setWhen(System.currentTimeMillis())
|
||||
.build();
|
||||
|
||||
return notif;
|
||||
|
|
Loading…
Reference in a new issue