Skip to content

ENG-2717: Send androidAppVersion in Android webview URL#157

Merged
marc-n-dream merged 2 commits into
masterfrom
marc/ENG-2717
Jul 2, 2026
Merged

ENG-2717: Send androidAppVersion in Android webview URL#157
marc-n-dream merged 2 commits into
masterfrom
marc/ENG-2717

Conversation

@marc-n-dream

@marc-n-dream marc-n-dream commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

What

  • Append androidAppVersion={Application.version} to the Android webview URL, alongside the existing bundle-version (Android-runtime only).
  • Extract the URL query-string assembly out of CreateAndroidWebview into a pure, device-independent BuildWebviewUrl seam so the Android and Web paths can be tested without a device.
  • Add PlayMode tests (AndroidWebviewUrlTests) covering both paths: Android-only params present on Android, absent on Web, shared params on both, well-formed query string, and correct field mapping.
  • Pin the project to Unity 2022.3.62f3.

Why

Report the Android application version to the platform for version tracking, matching the parameter already sent by the Automotive AirConsole Player.

Scope

  • In: androidAppVersion parameter, a behavior-preserving testability refactor, PlayMode tests, Unity version pin.
  • Out of scope: any change to the Web/WebGL URL parameters.

Testing

  • PlayMode suite run locally on the Android build target (Unity 2022.3.62f3): 10/10 passed.
  • Note: run headless tests with -buildTarget AndroidCheckPlatform ([InitializeOnLoadMethod]) switches the build target on load, which segfaults in batchmode when starting from a non-Android/WebGL target.

@marc-n-dream marc-n-dream force-pushed the marc/ENG-2717 branch 2 times, most recently from 3126560 to 83b9fab Compare July 2, 2026 01:46
Add the Android app version (Application.version) as an androidAppVersion
query parameter on the webview URL to report the app version to the
platform, matching the parameter already sent by the Automotive
AirConsole Player.

Extract the URL query assembly into a pure, device-independent
BuildWebviewUrl seam so the Android and Web paths are unit-testable, and
add PlayMode tests covering both.

Pin the project to Unity 2022.3.62f3.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@dragan-n-dream dragan-n-dream 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.

Besides one comment LGTM.

Comment thread Assets/AirConsole/scripts/Tests/PlayMode/AndroidWebviewUrlTests.cs Outdated
The QueryString_IsWellFormed test assumed the connection URL starts with
'?', but AirConsole builds it as a path with an embedded query start
(client?id=...&runtimePlatform=android). Mirror that real format and
assert the built URL starts with base+connection unchanged and keeps a
single '?'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@marc-n-dream marc-n-dream merged commit 39cf29a into master Jul 2, 2026
1 check passed
@marc-n-dream marc-n-dream deleted the marc/ENG-2717 branch July 2, 2026 08:51
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