fix: [SDK-4946] support Firebase 25.1 FID registration - #2697
Closed
fadi-george wants to merge 3 commits into
Closed
fix: [SDK-4946] support Firebase 25.1 FID registration#2697fadi-george wants to merge 3 commits into
fadi-george wants to merge 3 commits into
Conversation
Contributor
📊 Diff Coverage ReportDiff Coverage Report (Changed Lines Only)Gate: aggregate coverage on changed executable lines must be ≥ 80% (JaCoCo line data for lines touched in the diff). Changed Files Coverage
Overall (aggregate gate)0/31 touched executable lines covered (0.0% — requires ≥ 80%) Per-file detail (informational; gate is aggregate above):
❌ Coverage Check FailedAggregate coverage on touched lines is 0.0% (minimum 80%). |
fadi-george
force-pushed
the
fadi/sdk-4946
branch
from
July 28, 2026 18:56
358abde to
f2b795d
Compare
FCM v1 mints the installation ID against the project in FirebaseOptions but registers it under the sender ID, so the two must belong to the same Firebase project. OneSignal's fallback credentials point at a shared project, which the backend rejects with ApiException 8. Play Services below 261200000 also falls back to a legacy token that no public API exposes, so returning the FID there would upload an unroutable token. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
Support FCM registration when Firebase Installation ID registration is enabled.
Details
Motivation
Firebase Messaging 25.1 disables
getToken()when FID registration is enabled, preventing OneSignal push registration. Fixes #2696.Scope
Falls back to
register()and returns the Firebase Installation ID only when Firebase reports that the legacy API is disabled. Firebase Messaging 23.x and 24.x behavior remains unchanged.Testing
Unit testing
Added coverage for legacy token retrieval, FID registration, and unrelated error propagation. Verified against the default Firebase 24.0.0 dependency and Firebase 25.1.1. Notifications unit tests, Spotless, Detekt, and the release build pass. Android lint remains blocked by two unrelated existing errors in
SamsungHomeBadger.javaandSummaryNotificationDisplayer.kt.Manual testing
Not run on a physical device. The affected registration branches are covered with deterministic unit tests.
Affected code checklist
Checklist
Overview
Testing
Final pass