Enable creation time in notification
This commit is contained in:
parent
5a3491a4bb
commit
d2190fd998
2 changed files with 12 additions and 0 deletions
|
@ -60,6 +60,7 @@ public class ApiTwentyOnePlus {
|
||||||
.setPriority(Notification.PRIORITY_HIGH)
|
.setPriority(Notification.PRIORITY_HIGH)
|
||||||
.setNumber(msgCount)
|
.setNumber(msgCount)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
|
.setShowWhen(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return notif;
|
return notif;
|
||||||
|
@ -81,6 +82,7 @@ public class ApiTwentyOnePlus {
|
||||||
.setLights(ContextCompat.getColor(context, R.color.notification_color_led),
|
.setLights(ContextCompat.getColor(context, R.color.notification_color_led),
|
||||||
context.getResources().getInteger(R.integer.notification_ms_on),
|
context.getResources().getInteger(R.integer.notification_ms_on),
|
||||||
context.getResources().getInteger(R.integer.notification_ms_off))
|
context.getResources().getInteger(R.integer.notification_ms_off))
|
||||||
|
.setShowWhen(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return notif;
|
return notif;
|
||||||
|
@ -103,6 +105,7 @@ public class ApiTwentyOnePlus {
|
||||||
context.getResources().getInteger(R.integer.notification_ms_off))
|
context.getResources().getInteger(R.integer.notification_ms_off))
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
.setPriority(priority)
|
.setPriority(priority)
|
||||||
|
.setShowWhen(true)
|
||||||
.build();
|
.build();
|
||||||
} else {
|
} else {
|
||||||
notif = new Notification.Builder(context)
|
notif = new Notification.Builder(context)
|
||||||
|
@ -117,6 +120,7 @@ public class ApiTwentyOnePlus {
|
||||||
context.getResources().getInteger(R.integer.notification_ms_off))
|
context.getResources().getInteger(R.integer.notification_ms_off))
|
||||||
.setPriority(priority)
|
.setPriority(priority)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
|
.setShowWhen(true)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,6 +147,7 @@ public class ApiTwentyOnePlus {
|
||||||
context.getResources().getInteger(R.integer.notification_ms_off))
|
context.getResources().getInteger(R.integer.notification_ms_off))
|
||||||
.setPriority(Notification.PRIORITY_HIGH)
|
.setPriority(Notification.PRIORITY_HIGH)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
|
.setShowWhen(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return notif;
|
return notif;
|
||||||
|
@ -164,6 +169,7 @@ public class ApiTwentyOnePlus {
|
||||||
context.getResources().getInteger(R.integer.notification_ms_off))
|
context.getResources().getInteger(R.integer.notification_ms_off))
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
.setPriority(Notification.PRIORITY_HIGH)
|
.setPriority(Notification.PRIORITY_HIGH)
|
||||||
|
.setShowWhen(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return notif;
|
return notif;
|
||||||
|
|
|
@ -88,6 +88,7 @@ public class ApiTwentySixPlus {
|
||||||
.setPriority(Notification.PRIORITY_HIGH)
|
.setPriority(Notification.PRIORITY_HIGH)
|
||||||
.setNumber(msgCount)
|
.setNumber(msgCount)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
|
.setShowWhen(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return notif;
|
return notif;
|
||||||
|
@ -108,6 +109,7 @@ public class ApiTwentySixPlus {
|
||||||
.setVisibility(Notification.VISIBILITY_PUBLIC)
|
.setVisibility(Notification.VISIBILITY_PUBLIC)
|
||||||
.setPriority(Notification.PRIORITY_HIGH)
|
.setPriority(Notification.PRIORITY_HIGH)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
|
.setShowWhen(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return notif;
|
return notif;
|
||||||
|
@ -127,6 +129,7 @@ public class ApiTwentySixPlus {
|
||||||
.setVisibility(Notification.VISIBILITY_SECRET)
|
.setVisibility(Notification.VISIBILITY_SECRET)
|
||||||
.setPriority(priority)
|
.setPriority(priority)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
|
.setShowWhen(true)
|
||||||
.build();
|
.build();
|
||||||
} else {
|
} else {
|
||||||
notif = new Notification.Builder(context, context.getString(R.string.notification_service_channel_id))
|
notif = new Notification.Builder(context, context.getString(R.string.notification_service_channel_id))
|
||||||
|
@ -138,6 +141,7 @@ public class ApiTwentySixPlus {
|
||||||
.setVisibility(Notification.VISIBILITY_SECRET)
|
.setVisibility(Notification.VISIBILITY_SECRET)
|
||||||
.setPriority(priority)
|
.setPriority(priority)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
|
.setShowWhen(true)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,6 +165,7 @@ public class ApiTwentySixPlus {
|
||||||
.setVisibility(Notification.VISIBILITY_PRIVATE)
|
.setVisibility(Notification.VISIBILITY_PRIVATE)
|
||||||
.setPriority(Notification.PRIORITY_HIGH)
|
.setPriority(Notification.PRIORITY_HIGH)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
|
.setShowWhen(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return notif;
|
return notif;
|
||||||
|
@ -179,6 +184,7 @@ public class ApiTwentySixPlus {
|
||||||
.setVisibility(Notification.VISIBILITY_PRIVATE)
|
.setVisibility(Notification.VISIBILITY_PRIVATE)
|
||||||
.setPriority(Notification.PRIORITY_HIGH)
|
.setPriority(Notification.PRIORITY_HIGH)
|
||||||
.setWhen(System.currentTimeMillis())
|
.setWhen(System.currentTimeMillis())
|
||||||
|
.setShowWhen(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return notif;
|
return notif;
|
||||||
|
|
Loading…
Reference in a new issue