diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart index ff2b432bea..9381e6a64d 100644 --- a/lib/utils/background_push.dart +++ b/lib/utils/background_push.dart @@ -139,6 +139,11 @@ class BackgroundPush { }) async { if (PlatformInfos.isIOS) { await firebase?.requestPermission(); + } else if (PlatformInfos.isAndroid) { + _flutterLocalNotificationsPlugin + .resolvePlatformSpecificImplementation< + AndroidFlutterLocalNotificationsPlugin>() + ?.requestNotificationsPermission(); } final clientName = PlatformInfos.clientName; oldTokens ??= {}; diff --git a/lib/utils/push_helper.dart b/lib/utils/push_helper.dart index 2b4b561bf1..ccf5c38aa0 100644 --- a/lib/utils/push_helper.dart +++ b/lib/utils/push_helper.dart @@ -61,6 +61,7 @@ Future pushHelper( ticker: l10n.unreadChats(notification.counts?.unread ?? 1), importance: Importance.max, priority: Priority.max, + shortcutId: notification.roomId, fullScreenIntent: true, // To show notification popup ), ), @@ -233,6 +234,7 @@ Future _tryPushHelper( channelDescription: groupName, number: notification.counts?.unread, category: AndroidNotificationCategory.message, + shortcutId: event.room.id, styleInformation: messagingStyleInformation ?? MessagingStyleInformation( person,