Repository navigation
v9.1.13
Changed
- Android: BREAKING — Removed hardcoded
foregroundServiceType="shortService"from the library'sAndroidManifest.xml. Apps usingasForegroundService: trueon Android 14+ must now declare their ownforegroundServiceTypeonapp.notifee.core.ForegroundServicein 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) andonTimeout(int, int)(API 35+) inForegroundServiceto gracefully stop the service when Android's foreground service timeout fires. Previously, the missing handler caused an ANR crash when usingshortServicetype. (invertase/notifee#703) - Added early abort with clear error logging when
foregroundServiceTypeis not declared in the app manifest on Android 14+, preventing Android's crypticMissingForegroundServiceTypeExceptioncrash - Fixed bitwise
&used instead of logical&&inForegroundService.onStartCommand()null check — both operands were always evaluated, risking unintended side effects if the right side had them - Replaced deprecated
stopForeground(boolean)withstopForeground(STOP_FOREGROUND_REMOVE)on API 33+ via compat helper, with fallback for API 24-32 - Added
synchronizedblocks aroundForegroundServicestatic field cleanup to prevent race conditions between the STOP action handler, headless task completion callback, andonTimeout()paths ForegroundService.onTimeout()now emits aTYPE_FG_TIMEOUT(9) event viaEventBuswith the notification data,startId, andfgsType— 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