Repository navigation
10.8.1
·
23 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Added
- Android / foreground services (Slice C): exposed
EventType.FG_TIMEOUT = 9with optionalEventDetail.startIdandfgsTypetimeout metadata (fgsType = -1can come from the API 34 single-parameter callback), andnotificationwhen available. JavaScript delivery is best-effort; the event does not confirm Android service teardown, cancel JavaScript work, or authorize a new START. A suspended or terminated process may not execute the handler. Issue #82.
Fixed
- Android / foreground services (Slice D): qualified tracked initial
startForeground()promotion denial on Android 15+ (API 35+) is handled non-fatally on a never-promoted instance when request, ownership, and generation eligibility checks remain valid. Only the denied request is terminalized, other pending START obligations are preserved, and no runner starts for the denied promotion. Denial is not success; this is separate from #81 framework RETRY/REDELIVERY recovery and does not cover everyForegroundServiceStartNotAllowedException. Diagnostics retaincause=UNKNOWN. Issue #82. - Android / foreground services (Slice A): hardened timeout teardown with foreground demotion first (
STOP_FOREGROUND_REMOVE), conditional stopping fenced by current authority, foreground lifetime/ownership/generation protection, duplicate/stale callback checks, and preservation of the latest valid notification snapshot and pending/unknown START obligations. Demotion and stop failures remain observable. Handling requires Android to deliver the callback and the process to execute it; this does not universally prevent OEM timeout crashes. Issue #82. - Android / foreground services: on Android 12+ (API 31+), a framework-retried or redelivered START after process death no longer fatally propagates
ForegroundServiceStartNotAllowedExceptionwhen background restrictions deny its initialstartForeground()promotion. This non-fatal recovery applies only to a START with framework RETRY/REDELIVERY flags, a valid explicit request UUID absent from pending requests, and no acquired foreground state or service runner. It does not claim a successful promotion or settle other pending STARTs; stopping is deferred while they remain pending and re-evaluated once none remain pending after definite rejection, provided the denied delivery is still current. Outside the separately documented #82 tracked initial denial recovery, app-requested START failures, unrelated errors, and invalid configurations retain their existing error handling. No public API changes. Issue #81.
Tests
- Android / Slice A host/static validation: 464 Android tests PASS, including 229
ForegroundServiceTesttests; 17 causal mutations detected. Independent Reviewer: APPROVED WITH NOTES. These checks are separate from Android device evidence. Issue #82. - Android / Slice D real-device validation: Pixel 9 Pro XL, Android 17/API 37; R1–R6 PASS with real exhaustion of an abbreviated
dataSyncbudget, real denial of a new initial promotion, non-fatal recovery, and a valid new START after the app returned to TOP (foreground). Issue #82. - Android / Slice A real-device validation: on the same Pixel model/API, A-R1–A-R8 PASS: real framework timeout, demotion returned, conditional stop accepted, independently verified AMS teardown, one received
FG_TIMEOUT, original process survival, valid new START/STOP after TOP, and certified cleanup. A-R9 concurrent START/timeout race: NOT_RUN. This was a responsive process and did not reproduce an OEM freeze; qualification on vivo/iQOO/OnePlus in the originally reported conditions remains NOT_RUN. The PASS applies to the historical qualified candidate/APK; subsequent diagnostic binding corrections were host-validated and did not constitute a new device qualification. Issue #82. - Android / foreground services: 394 Android tests passed, including #81 regressions for RETRY/REDELIVERY eligibility, initial promotion denial, error boundaries, concurrent pending STARTs, deferred stop after definite rejection, and stale instance/runner ownership. Independent reviews approved the fix.
- Android / foreground-service runtime: persistent START, notification update, background operation, and STOP smoke checks passed on a Pixel 9 Pro XL running Android 17/API 37. Two real SIGKILLs inside
onStartCommand, before acknowledgement to Android's Activity Manager, were followed by automatic service restart and allowed foreground promotion. RETRY/REDELIVERY flags on the restarted deliveries were not captured. Promotion denial after restart was not reproduced, so the specific #81 recovery was not exercised on the Pixel; runtime recovery on vivo/Android 16 remains unverified.
📦 npm: https://www.npmjs.com/package/react-native-notify-kit/v/10.8.1