Add channel ID to push notification sent on failed reply (#3673)

This commit is contained in:
Miguel Alatzar 2019-12-09 12:14:50 -07:00 committed by CJ
parent a58ebad7b1
commit 29c27417bd

View file

@ -133,12 +133,16 @@ public class NotificationReplyBroadcastReceiver extends BroadcastReceiver {
String packageName = mContext.getPackageName();
int smallIconResId = res.getIdentifier("ic_notification", "mipmap", packageName);
Bundle userInfoBundle = new Bundle();
userInfoBundle.putString("channel_id", channelId);
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_ID, NotificationManager.IMPORTANCE_LOW);
notificationManager.createNotificationChannel(channel);
Notification notification =
new Notification.Builder(mContext, CHANNEL_ID)
.setContentTitle("Message failed to send.")
.setSmallIcon(smallIconResId)
.addExtras(userInfoBundle)
.build();
CustomPushNotification.clearNotification(mContext, notificationId, channelId);