Multiple bug fixes (#1287)

This commit is contained in:
enahum
2017-12-08 11:37:14 -03:00
committed by Harrison Healey
parent 49b0e4cb66
commit 62cedae196
5 changed files with 49 additions and 16 deletions

View File

@@ -63,6 +63,17 @@ public class CustomPushNotification extends PushNotification {
}
}
public static void clearNotification(Context mContext, int notificationId, String channelId) {
if (notificationId != -1) {
channelIdToNotificationCount.remove(channelId);
channelIdToNotification.remove(channelId);
if (mContext != null) {
final NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(notificationId);
}
}
}
@Override
public void onReceived() throws InvalidNotificationException {
Bundle data = mNotificationProps.asBundle();