@@ -55,6 +55,7 @@ object SnackbarNotificationManager {
5555 .setSmallIcon(R .drawable.ic_launcher_foreground)
5656 .setContentTitle(" You order is being placed" )
5757 .setContentText(" Confirming with bakery..." )
58+ .setShortCriticalText(" Placing" )
5859 .setStyle(buildBaseProgressStyle(INITIALIZING ).setProgressIndeterminate(true ))
5960 }
6061 },
@@ -64,6 +65,7 @@ object SnackbarNotificationManager {
6465 return buildBaseNotification(appContext, FOOD_PREPARATION )
6566 .setContentTitle(" Your order is being prepared" )
6667 .setContentText(" Next step will be delivery" )
68+ .setShortCriticalText(" Prepping" )
6769 .setLargeIcon(
6870 IconCompat .createWithResource(
6971 appContext, R .drawable.cupcake
@@ -92,6 +94,9 @@ object SnackbarNotificationManager {
9294 appContext, R .drawable.cupcake
9395 ).toIcon(appContext)
9496 )
97+ .setWhen(System .currentTimeMillis().plus(11 * 60 * 1000 /* 10 min */ ))
98+ .setUsesChronometer(true )
99+ .setChronometerCountDown(true )
95100 }
96101 },
97102 FOOD_ARRIVING (18000 ) {
@@ -114,6 +119,9 @@ object SnackbarNotificationManager {
114119 appContext, R .drawable.cupcake
115120 ).toIcon(appContext)
116121 )
122+ .setWhen(System .currentTimeMillis().plus(11 * 60 * 500 /* 5 min */ ))
123+ .setUsesChronometer(true )
124+ .setChronometerCountDown(true )
117125 }
118126 },
119127 ORDER_COMPLETE (21000 ) {
@@ -131,6 +139,7 @@ object SnackbarNotificationManager {
131139 )
132140 .setProgress(100 )
133141 )
142+ .setShortCriticalText(" Arrived" )
134143 .setLargeIcon(
135144 IconCompat .createWithResource(
136145 appContext, R .drawable.cupcake
@@ -224,7 +233,7 @@ object SnackbarNotificationManager {
224233 null , " Rate delivery" , null ).build()
225234 )
226235 }
227- return notificationBuilder
236+ return notificationBuilder
228237 }
229238
230239 abstract fun buildNotification (): NotificationCompat .Builder
0 commit comments