Messaging
interface Messaging
Messaging feature — interact with Firebase Cloud Messaging (FCM) through AFCore.
This interface provides operations for:
Managing device tokens (register, update, delete).
Requesting notification permissions.
Subscribing/unsubscribing to topics.
Receiving foreground data messages.
Configuring notification presentation options.
Platform & threading
All suspend functions must be called from a coroutine.
Errors surface as
Throwableand should be handled at call sites.
Typical flows
Token lifecycle: use updateToken or deleteToken when device state changes.
Topics: use subscribe / unsubscribe for group notifications.
Foreground messages: observe messages for in-app handling.