fix(android/engine): Dismiss notification when touched

This commit is contained in:
Darcy Wong 2020-09-01 14:51:20 +07:00
parent cf858950b6
commit b1ee4111e2

View file

@ -148,7 +148,7 @@ public class ResourcesUpdateTool implements KeyboardEventHandler.OnKeyboardDownl
channel.setDescription(description);
// Register the channel with the system; you can't change the importance
// or other notification behaviors after this
NotificationManager notificationManager = aContext.getSystemService(NotificationManager.class);
NotificationManager notificationManager = (NotificationManager) aContext.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.createNotificationChannel(channel);
}
}
@ -428,6 +428,7 @@ public class ResourcesUpdateTool implements KeyboardEventHandler.OnKeyboardDownl
.setContentTitle(currentContext.getString(R.string.keyboard_updates_available))
.setContentText(message)
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
.setAutoCancel(true)
.setContentIntent(startUpdateIntent)
.setOngoing(true);