Skip to content

chore(馃): give the example app its own Android application id - #575

Merged
wcandillon merged 1 commit into
mainfrom
example-package-id
Oct 18, 2026
Merged

wcandillon merged 1 commit into
mainfrom
example-package-id

Conversation

@wcandillon

Copy link
Copy Markdown
Owner

Why

Every react-native-test-app example builds to the test app's default application id, com.microsoft.reacttestapp, so the WebGPU and Skia examples replace each other on a device and cannot be installed side by side (which cost an aborted e2e run while verifying #574).

What

  • apps/example/app.json sets android.package to com.reactnativewebgpu.example; react-native-test-app writes it to applicationId.
  • react-native.config.js keeps packageName at com.microsoft.reacttestapp with a comment: that field is the Java namespace, which the CLI's generated ReactNativeApplicationEntryPoint reads BuildConfig from, and the test app's app module keeps its own. Pointing it at the new id fails the Java compile.
  • ci.yml launches the test app by the new id.
  • agent.yml uses the new id and starts the activity by its full class name, com.microsoft.reacttestapp.MainActivity, since the relative .MainActivity would resolve against the new application id and fail.

Companion: wcandillon/react-native-skia#4265 with com.reactnativeskia.example.

Verification

A debug build's APK reports package: name='com.reactnativewebgpu.example' and launchable-activity: name='com.microsoft.reacttestapp.MainActivity' (aapt2 dump badging). Anyone with the old id installed keeps it as a separate app until they uninstall it.

react-native-test-app builds every example to its default application id,
com.microsoft.reacttestapp, so the WebGPU and Skia examples replaced each
other on a device and could not be installed side by side. The example now
sets `android.package` in app.json, which the test app writes to
`applicationId`: com.reactnativewebgpu.example.

The Java namespace stays the test app's own (com.microsoft.reacttestapp):
`packageName` in react-native.config.js keeps naming it, since the CLI's
generated entry point reads BuildConfig from that package, and the
launcher activity keeps its full name. The CI launch by package is
updated, and the agent workflow starts the activity by its full class
name instead of one relative to the application id.

Verified with a debug build: the APK's package is
com.reactnativewebgpu.example and its launchable activity is
com.microsoft.reacttestapp.MainActivity.
@wcandillon
wcandillon merged commit c080934 into main Oct 18, 2026
5 checks passed
@github-actions

Copy link
Copy Markdown

馃帀 This PR is included in version 0.17.0 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant