Skip to content

v9.1.13

Choose a tag to compare

@marcocrupi marcocrupi released this 05 Apr 20:34
· 528 commits to main since this release

Changed

  • Android: BREAKING — Removed hardcoded foregroundServiceType="shortService" from the library's AndroidManifest.xml. Apps using asForegroundService: true on Android 14+ must now declare their own foregroundServiceType on app.notifee.core.ForegroundService in their app manifest. See the "Foreground Service Setup" section in the README for migration instructions. (invertase/notifee#1108)

Fixed

Android

  • Implemented onTimeout(int) (API 34) and onTimeout(int, int) (API 35+) in ForegroundService to gracefully stop the service when Android's foreground service timeout fires. Previously, the missing handler caused an ANR crash when using shortService type. (invertase/notifee#703)
  • Added early abort with clear error logging when foregroundServiceType is not declared in the app manifest on Android 14+, preventing Android's cryptic MissingForegroundServiceTypeException crash
  • Fixed bitwise & used instead of logical && in ForegroundService.onStartCommand() null check — both operands were always evaluated, risking unintended side effects if the right side had them
  • Replaced deprecated stopForeground(boolean) with stopForeground(STOP_FOREGROUND_REMOVE) on API 33+ via compat helper, with fallback for API 24-32
  • Added synchronized blocks around ForegroundService static field cleanup to prevent race conditions between the STOP action handler, headless task completion callback, and onTimeout() paths
  • ForegroundService.onTimeout() now emits a TYPE_FG_TIMEOUT (9) event via EventBus with the notification data, startId, and fgsType — previously the service died silently with no event reaching JS

Full Changelog: https://github.com/marcocrupi/react-native-notify-kit/blob/main/CHANGELOG.md

yarn add react-native-notify-kit@9.1.13