Skip to content

v1.4.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 11 Dec 23:44
· 1 commit to main since this release
82e6de8

What's Changed

  • Customize notifications. Kotlin DSL syle, and Notification Image support by @mirzemehdi in #95
  • Adding setListener to set one listener or to remove existing listeners by @mirzemehdi in #94
  • Exposing KEY_URL and mutable to make it customizable by @mirzemehdi in #93
  • Returning null for Firebase get token when exception occurs by @mirzemehdi in #92
  • Bump lib deps by @mirzemehdi in #97

Now you can send notifications in kotlin dsl style, and finally sending images are supported both in android and ios 🎉🥳

in image field you can either pass:

  1. NotificationImage.Url("image url here") (make sure you also add internet permission, because it will need to download image from url)
  2. NotificationImage.File("image file path") (make sure your app has necessry permission to access that image file path to be able to read its contents)

Example code:

val notifier = NotifierManager.getLocalNotifier()
notifier.notify {
  id= Random.nextInt(0, Int.MAX_VALUE)
  title = "Title from KMPNotifier"
  body = "Body message from KMPNotifier"
  payloadData = mapOf(
    Notifier.KEY_URL to "https://github.com/mirzemehdi/KMPNotifier/",
    "extraKey" to "randomValue"
  )
  image = NotificationImage.Url("https://github.com/user-attachments/assets/a0f38159-b31d-4a47-97a7-cc230e15d30b")
}

Full Changelog: v1.3.0...v1.4.0