Repository navigation
chore: [SDK-5687] enable Firebase Installation IDs in demo app - #2836
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
📊 Diff Coverage Report✓ Coverage check passed (no source files changed) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also build the gms and huawei demo variants in separate Gradle runs in CI, since the Huawei plugin's config only matches the huawei applicationId. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abdulraqeeb33
left a comment
There was a problem hiding this comment.
Two configuration holes in the demo Installation ID switch. Details are on the manifest flag and the gms applicationId.
Nits:
examples/build.md:126and.github/actions/setup-demo/action.yml:40-42still sayONESIGNAL_APP_IDresolves through a built-in default.preBuildandexamples/build.md:30require the id and fail the build when it is unset.examples/demo/GettingStarted.md:12still lists API 21 as the minimum device. The gms flavor isminSdk23. Huawei stays on 21.examples/demo/scripts/retry/README.mdstep 2 runs./retry-test.sh installwith no app id.cmd_installpasses-PONESIGNAL_APP_IDonly whenRETRY_TEST_IV_APP_IDis set, so a fresh checkout fails at:app:preBuild. The Gradle message names the fix. Add the requirement to that setup list. The uninstall line namescom.onesignal.sdkdemoonly, so an existingcom.onesignal.examplegms install stays on the device as a second app.
The preBuild app-id check, the ${applicationId} ADM entries, and the split gms/Huawei Gradle runs for agconnect look right.
Turn firebase_messaging_installation_id_enabled on only when google-services.json exists, skip the Google Services plugin for Huawei-only runs, and fix stale docs (app ID default, gms minSdk, retry setup). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Nits fixed in 3aa0a90: build.md and the setup-demo comment note ONESIGNAL_APP_ID has no default, GettingStarted lists API 23 for gms and 21 for huawei, and the retry README now requires an app ID and mentions uninstalling the old com.onesignal.example install. |
abdulraqeeb33
left a comment
There was a problem hiding this comment.
Both fixed in 3aa0a90.
- The Installation ID flag is on only when
google-services.jsonexists, so an unconfigured gms build keeps the legacy token. - The Google Services plugin is skipped for Huawei-only Gradle runs.
assembleHuaweiDebugwith a sdkdemo-only json is the case that was failing.
./gradlew build and assemble (no flavor in the task name) still apply the plugin, so that same json fails the Huawei variant. The split CI invocations avoid it.
The required checks on this commit are red because code-quality and demo-build came back abandoned, and the lint workflow recorded no jobs. test passed. Worth a rerun before merge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Description
One Line Summary
Enable Firebase Installation ID registration in the demo app and rename its gms package to
com.onesignal.sdkdemo.Details
Motivation
The demo should exercise FID registration end to end, and share one Firebase/OneSignal package (
com.onesignal.sdkdemo) across SDK demos.Scope
Demo app and CI only. No SDK changes.
firebase_messaging_installation_id_enabled=true.firebase-messaging:25.1.2andminSdk 23(25.x requires it). Huawei unchanged (minSdk 21,com.onesignal.example, since its agconnect config is tied to that package).applicationId→com.onesignal.sdkdemo. ADM permission/category now use${applicationId}.build.mdupdated for the new package.setup-demowritesgoogle-services.jsonfrom theAPPIUM_GOOGLE_SERVICES_JSONsecret via the sharedsetup-google-servicesaction.google-services.jsonstays gitignored.bundle-id: com.onesignal.sdkdemoto the shared Appium workflow (the shared default stayscom.onesignal.exampleuntil every SDK migrates).ONESIGNAL_APP_IDis now required (local.propertiesor-P);preBuildfails with a clear message if unset. IDE sync, spotless, and detekt still work without it. CI demo builds pass a placeholder app ID.com.onesignal.example.Depends on OneSignal/sdk-shared#69 and the
APPIUM_GOOGLE_SERVICES_JSONorg secret. Merge after both.Testing
Unit testing
None; config-only.
Manual testing
Built
assembleGmsDebug,assembleGmsRelease, andassembleHuaweiDebugfromOneSignalSDK/with-PSDK_VERSION=5.11.0. Verified a build withoutONESIGNAL_APP_IDfails at:app:preBuildwith the expected message, and spotless/detekt pass without it. Verified merged gms manifest has packagecom.onesignal.sdkdemo, FID flagtrue, and ADM entries using the new package;firebase-messagingresolves to 25.1.2; google-services plugin generatesgcm_defaultSenderId. Not run on a device.Affected code checklist
Checklist
Overview
Testing
Final pass
🤖 Generated with Claude Code