Skip to content

chore: [SDK-5613] standardize push subscription UI in the demo app - #906

Open
fadi-george wants to merge 1 commit into
mainfrom
fadi/sdk-5613
Open

fadi-george wants to merge 1 commit into
mainfrom
fadi/sdk-5613

Conversation

@fadi-george

Copy link
Copy Markdown
Collaborator

Description

One Line Summary

Standardize the demo push subscription UI and add a language selector.

Details

Motivation

Part of SDK-5300 (standardize push subscription UI across SDK demo apps). Matches the Android demo (OneSignal/OneSignal-Android-SDK#2760).

Scope

Demo app only (examples/demo). SDK unchanged.

  • Push section: new read-only Status row above the toggle. It shows Subscribed only when the user is opted in, notification permission is granted, and a push token is present; otherwise Unsubscribed. It updates from the existing subscription and permission observers, and the push token is now tracked too.
  • The toggle label changes from "Enabled" to Opted In. The existing test ID is unchanged, so Appium selectors still work. The status row uses push_subscription_status, same as Android.
  • User section: new Language row after External ID with Device Default plus the same 43 languages, in the same order, as Android and iOS (user_language_dropdown). It calls setLanguage(code), and Device Default sends '', which the native SDK resolves to the device language. The choice is saved only so the picker shows it after a restart; it is not re-sent at launch, since native keeps its own value. Logout resets it to Device Default, as Android and iOS do.
  • The picker is a code-built UI Toolkit dialog (LanguagePickerDialog) rather than Unity's dropdown, whose menu items aren't visible to the demo's Appium tap handling.

Testing

Unit testing

No unit tests; demo UI reading existing SDK state.

Manual testing

csharpier check . and validate-unity-distribution.py pass. The demo scripts compile against Unity 6000.4 and 2022.3 libraries outside the editor. Not run in the Unity editor or on a device.

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
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • 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
  • 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

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

🤖 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 October 27, 2026 02:53
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.

1 participant