KMPNotifier
Main entry point of the KMPNotifier library.
Initialize it once on application start, passing the platform configuration and the capabilities (extensions) you want to use:
// Local notifications only:
KMPNotifier.initialize(configuration, LocalNotifications)
// Local + Firebase push (android/ios, requires kmpnotifier-push-firebase):
KMPNotifier.initialize(configuration, FirebasePush)Local notifications are then available through KMPNotifier.localNotifier (or LocalNotifications.notifier), and push through KMPNotifier.firebasePushNotifier (or FirebasePush.notifier).
Types
Properties
Whether initialize has been called.
Permission util to check and ask notification permission. On Android, runtime permission must be requested in an Activity — see ComponentActivity.permissionUtil().
Functions
Adds a listener for shared notification events.
Initializes the library. Call on application start.
Initializes the library. Call on application start. On iOS call it from the main thread (e.g. in didFinishLaunchingWithOptions) — the notification-center delegate is installed during initialization. Calling it again is a no-op for the configuration; extensions not yet installed are still installed.
In order to receive notification data payload this function needs to be called in Android side in launcher Activity #onCreate and #onNewIntent methods.
Emits the notification-clicked event for the given notification content.
Removes a previously added listener.
Replaces all listeners with the given one. Pass null to remove all listeners.