Skip to content

chore: [SDK-5804] default Android demo to the shared example app - #2859

Merged
fadi-george merged 1 commit into
mainfrom
fadi/sdk-5804
Nov 24, 2026
Merged

fadi-george merged 1 commit into
mainfrom
fadi/sdk-5804

Conversation

@fadi-george

Copy link
Copy Markdown
Contributor

Description

One Line Summary

Build the Android demo as com.onesignal.example with the shared default app ID, and keep com.onesignal.sdkdemo for E2E.

Details

Motivation

Part of SDK-5802: every SDK demo should build out of the box against the shared example app, while E2E keeps the com.onesignal.sdkdemo package its FCM config and BrowserStack setup use.

Scope

  • gms applicationId = DEMO_BUNDLE_ID (-P or local.properties, default com.onesignal.example). huawei stays on com.onesignal.example, so it still matches agconnect-services.json.
  • ONESIGNAL_APP_ID falls back to 1154c350-e715-4b71-a58b-1b84b6745baa. The preBuild check that failed the build is removed.
  • The Google Services plugin is applied only when app/google-services.json has a client for the current package. Otherwise the build warns and skips Firebase. FIREBASE_INSTALLATION_ID_ENABLED=true without a matching client still fails, now with a clearer message.
  • e2e.yml passes -PDEMO_BUNDLE_ID=com.onesignal.sdkdemo.
  • The retry scripts default to com.onesignal.example, pass -PDEMO_BUNDLE_ID on install, and pass the package to the Maestro flows (appId: ${APP_ID}).
  • Docs: examples/build.md, GettingStarted.md, local.properties.example, and the retry README.

The matching sdk-shared run-local change, which passes -PDEMO_BUNDLE_ID=$BUNDLE_ID and enables Firebase Installation IDs only when the JSON has that client, is on sdk-shared main.

Testing

Manual testing

  • assembleGmsDebug with no config files: package com.onesignal.example, BuildConfig.ONESIGNAL_APP_ID = 1154c350….
  • Default build with -PFIREBASE_INSTALLATION_ID_ENABLED=true and a google-services.json for com.onesignal.example: builds, and the manifest flag is true.
  • -PDEMO_BUNDLE_ID=com.onesignal.sdkdemo with a JSON that only has com.onesignal.example: builds as com.onesignal.sdkdemo without Firebase. Adding FIREBASE_INSTALLATION_ID_ENABLED=true fails with the new message.
  • assembleHuaweiDebug: package com.onesignal.example.
  • spotlessCheck passes.
  • run-local.sh --platform=android --sdk=android --spec=01_user on an emulator: 2 of 2 passing.

Push on com.onesignal.example needs FCM credentials on the default app.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed (demo config only)
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible (emulator)

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

🤖 Generated with Claude Code

The gms flavor builds as com.onesignal.example by default with the shared
default app ID; E2E passes -PDEMO_BUNDLE_ID=com.onesignal.sdkdemo. A
missing app ID no longer fails the build, and google-services.json is
only applied when it has a client for the package.

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 24, 2026 19:45
@github-actions

Copy link
Copy Markdown
Contributor

📊 Diff Coverage Report

✓ Coverage check passed (no source files changed)

📥 View workflow run

@fadi-george
fadi-george merged commit 40f471f into main Nov 24, 2026
5 checks passed
@fadi-george
fadi-george deleted the fadi/sdk-5804 branch November 24, 2026 20:05
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