Skip to content

chore: [SDK-5690] enable Firebase Installation IDs in demo app - #1201

Merged
fadi-george merged 2 commits into
mainfrom
fadi/sdk-5690
Nov 10, 2026
Merged

fadi-george merged 2 commits into
mainfrom
fadi/sdk-5690

Conversation

@fadi-george

Copy link
Copy Markdown
Collaborator

One Line Summary

Enable Firebase Installation ID registration for the Flutter demo's Android E2E build and move Android examples to com.onesignal.sdkdemo.

Motivation

SDK-5690. Same approach as OneSignal/OneSignal-Android-SDK#2836 and OneSignal/OneSignal-Capacitor-SDK#81.

Scope

  • examples/demo Android:
    • The firebase_messaging_installation_id_enabled manifest flag comes from -PFIREBASE_INSTALLATION_ID_ENABLED (flutter build apk -P...). It is off by default, and the build fails if it is on without google-services.json.
    • The Google Services plugin is applied only when google-services.json exists. The file is gitignored.
    • firebase-messaging is pinned to 25.1.3, the version Installation ID registration needs.
  • E2E Android job:
    • Writes google-services.json from APPIUM_GOOGLE_SERVICES_JSON with the sdk-shared setup-google-services action.
    • Builds with the flag on and passes bundle-id: com.onesignal.sdkdemo.
    • iOS is unchanged.
  • Default app ID removed from demo and demo-pods. main.dart throws at startup when ONESIGNAL_APP_ID is empty, and create-demo-env fails CI when it is empty. Flutter has no build-time hook for this check.
  • The Android package of every example is renamed to com.onesignal.sdkdemo. iOS stays com.onesignal.example. Only demo gets the Firebase Installation ID and E2E changes.
  • Docs updated.
  • sdk-shared run-local (on main): detects the Flutter sdkdemo package and turns the flag on when google-services.json exists.

Testing

  • demo debug builds give the expected merged-manifest values for each case:
    • Flag off, no google-services.json: false.
    • Flag on, no google-services.json: the build fails with the expected message.
    • Flag on, with google-services.json: true.
    • Flag off, with google-services.json: false.
  • The APK package is com.onesignal.sdkdemo, and it resolves firebase-messaging 25.1.3.
  • flutter analyze on demo and demo-pods shows only the one existing info on main.
  • E2E has not run yet.

Affected code checklist

  • Notifications
  • In-app messages
  • User / subscriptions
  • Demo apps / CI

Checklist

  • No SDK (plugin) code changes
  • google-services.json stays gitignored

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fadi-george
fadi-george requested a review from a team as a code owner November 10, 2026 19:50

@abdulraqeeb33 abdulraqeeb33 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Installation ID flag, the missing-json failure, and firebase-messaging 25.1.3 match the Android and Capacitor demos. android:value="true" compiles as a boolean, which is what OneSignal reads.

Two nits on the README order and the new StateError lines.

Comment thread examples/demo/README.md Resolved
Comment thread examples/demo/lib/main.dart Resolved
Comment thread examples/demo-pods/lib/main.dart Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fadi-george
fadi-george merged commit cae98b9 into main Nov 10, 2026
2 checks passed
@fadi-george
fadi-george deleted the fadi/sdk-5690 branch November 10, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants