File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -235,16 +235,21 @@ If you are using mac make sure you also allow notifications for browser from sys
235235You can send either local or push notification.
236236
237237### Local Notification
238- Local notifications are supported on Android, iOS, JS and wasm targets.
238+ Local notifications are supported on Android, iOS, JS and wasm targets. Image is supported on Android and iOS
239239#### Send notification
240240
241241``` kotlin
242242val notifier = NotifierManager .getLocalNotifier()
243- val notificationId = notifier.notify(" Title" , " Body" )
244- // or you can use below to specify ID yourself
245- notifier.notify(1 , " Title" , " Body" )
246-
247-
243+ notifier.notify {
244+ id= Random .nextInt(0 , Int .MAX_VALUE )
245+ title = " Title from KMPNotifier"
246+ body = " Body message from KMPNotifier"
247+ payloadData = mapOf (
248+ Notifier .KEY_URL to " https://github.com/mirzemehdi/KMPNotifier/" ,
249+ " extraKey" to " randomValue"
250+ )
251+ image = NotificationImage .Url (" https://github.com/user-attachments/assets/a0f38159-b31d-4a47-97a7-cc230e15d30b" )
252+ }
248253```
249254
250255#### Remove notification by Id or all notifications
You can’t perform that action at this time.
0 commit comments