Notification when get new order / Delete Category & Food

This commit is contained in:
phanhuuloi27
2022-06-08 20:59:12 +07:00
parent 1c5b30eae9
commit 94967ca1c0
6 changed files with 145 additions and 4 deletions
+1
View File
@@ -43,6 +43,7 @@ dependencies {
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
implementation 'androidx.navigation:navigation-fragment:2.3.5'
implementation 'androidx.navigation:navigation-ui:2.3.5'
implementation 'com.google.firebase:firebase-auth:19.2.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
@@ -78,10 +78,10 @@ public class ListenOrder extends Service implements ChildEventListener {
.setDefaults(Notification.DEFAULT_ALL)
.setWhen(System.currentTimeMillis())
.setTicker("food")
.setContentInfo("your order was updated")
.setContentText("Order #"+key+" was updated to "+ Common.convertCodeToStatus(request.getStatus()))
.setContentInfo("Tình trạng đơn hàng của bạn đã được cập nhật")
.setContentText("Đơn hàng #"+key+" đã cập nhật thành "+ Common.convertCodeToStatus(request.getStatus()))
.setContentIntent(contentIntent)
.setContentInfo("Info")
.setContentInfo("Thông tin")
.setSmallIcon(R.mipmap.ic_launcher);
NotificationManager notificationManager=(NotificationManager)getBaseContext().getSystemService(Context.NOTIFICATION_SERVICE);