messages
Stream of foreground data messages.
The SDK parses standard keys and emits IncomingMessage objects whenever a push notification arrives while the app is active.
Example usage:
lifecycleScope.launch {
AFCore.messaging().messages().collect { msg ->
showInAppNotification(msg.title, msg.body)
}
}Content copied to clipboard
Task {
for await msg in AFCore.shared.messaging().messages() {
self.showInAppNotification(msg.title, msg.body)
}
}Content copied to clipboard