flutter_local_notifications icon indicating copy to clipboard operation
flutter_local_notifications copied to clipboard

get threadIdentifier from getActiveNotifications

Open ASE55471 opened this issue 3 months ago • 2 comments

Is there any way to get threadIdentifier from getActiveNotifications?

There is a plugin call notifications_utils which return threadIdentifier when get delivered notifications, Is that possible to achieve that in this plugin?

ASE55471 avatar Sep 10 '25 21:09 ASE55471

Could you look at submitting a PR for this?

MaikuB avatar Sep 19 '25 13:09 MaikuB

For context:

Apple docs: https://developer.apple.com/documentation/usernotifications/unnotificationcontent/threadidentifier

Relevant iOS lines: https://github.com/MaikuB/flutter_local_notifications/blob/master/flutter_local_notifications/ios/flutter_local_notifications/Sources/flutter_local_notifications/FlutterLocalNotificationsPlugin.m#L313-L341

Relevant MacOS lines: https://github.com/MaikuB/flutter_local_notifications/blob/ecd66b1515d17e327a62ca4ff8e94f925e97d688/flutter_local_notifications/macos/flutter_local_notifications/Sources/flutter_local_notifications/FlutterLocalNotificationsPlugin.swift#L336C1-L344C6

As for the Dart side, you can probably since the threadIdentifier is basically the iOS/MacOS equivalent of groupKey, you can put it in ActiveNotification.groupKey` and update the documentation

https://github.com/MaikuB/flutter_local_notifications/blob/ecd66b1515d17e327a62ca4ff8e94f925e97d688/flutter_local_notifications_platform_interface/lib/src/types.dart#L60-L63

Levi-Lesches avatar Sep 19 '25 15:09 Levi-Lesches