Skip to content

Commit 8d7e221

Browse files
docs(messaging, android): update inline documentation on behavior (#12948)
1 parent 43d8158 commit 8d7e221

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/firebase_messaging/firebase_messaging/lib/src/messaging.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ class FirebaseMessaging extends FirebasePluginPlatform {
8787
/// This should be used to determine whether specific notification interaction
8888
/// should open the app with a specific purpose (e.g. opening a chat message,
8989
/// specific screen etc).
90+
///
91+
/// on Android, if the message was received in the foreground, and the notification was
92+
/// pressed whilst the app is in a background/terminated state, this will return `null`.
9093
Future<RemoteMessage?> getInitialMessage() {
9194
return _delegate.getInitialMessage();
9295
}

packages/firebase_messaging/firebase_messaging_platform_interface/lib/src/platform_interface/platform_interface_messaging.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ abstract class FirebaseMessagingPlatform extends PlatformInterface {
141141
/// This should be used to determine whether specific notification interaction
142142
/// should open the app with a specific purpose (e.g. opening a chat message,
143143
/// specific screen etc).
144+
///
145+
/// on Android, if the message was received in the foreground, and the notification was
146+
/// pressed whilst the app is in a background/terminated state, this will return `null`.
144147
Future<RemoteMessage?> getInitialMessage() {
145148
throw UnimplementedError('getInitialMessage() is not implemented');
146149
}

0 commit comments

Comments
 (0)