diff --git a/.github/workflows/agent.yml b/.github/workflows/agent.yml index ff52e39e2..b24db81a5 100644 --- a/.github/workflows/agent.yml +++ b/.github/workflows/agent.yml @@ -244,7 +244,7 @@ jobs: METRO_PORT: 8081 ANDROID_AVD: webgpu-agent ANDROID_SYSTEM_IMAGE: system-images;android-35;default;x86_64 - ANDROID_PACKAGE: com.microsoft.reacttestapp + ANDROID_PACKAGE: com.reactnativewebgpu.example AGENT_OUTPUT: ${{ github.workspace }}/agent-output steps: # The pull request's head when a number is given. The build then runs @@ -389,7 +389,9 @@ jobs: ok=0; for i in 1 2 3 4 5; do adb wait-for-device install -r apps/example/android/app/build/outputs/apk/debug/app-debug.apk && ok=1 && break; echo "adb install failed (attempt $i)"; sleep 5; done; [ "$ok" = 1 ] curl -sf --max-time 900 -o /dev/null \ "http://localhost:$METRO_PORT/index.bundle?platform=android&dev=true&lazy=true&minify=false" - adb shell am start -W -n "$ANDROID_PACKAGE/.MainActivity" + # The activity keeps react-native-test-app's own package name: the + # application id is the example's, the Java namespace is not. + adb shell am start -W -n "$ANDROID_PACKAGE/com.microsoft.reacttestapp.MainActivity" sleep 20 adb exec-out screencap -p > "$AGENT_OUTPUT/launch.png" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aab42b91a..d986f278d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -424,7 +424,7 @@ jobs: adb reverse tcp:8081 tcp:8081 nohup adb logcat > logcat.txt 2>&1 & adb install -r apps/example/android/app/build/outputs/apk/debug/app-debug.apk - adb shell monkey -p com.microsoft.reacttestapp 1 + adb shell monkey -p com.reactnativewebgpu.example 1 cd packages/webgpu && yarn test # Same purpose as the iOS upload above: missing snapshots written on this diff --git a/apps/example/app.json b/apps/example/app.json index 73135e124..a85b9cee3 100644 --- a/apps/example/app.json +++ b/apps/example/app.json @@ -34,6 +34,7 @@ } }, "android": { + "package": "com.reactnativewebgpu.example", "permissions": [ { "android:name": "android.permission.INTERNET" }, { "android:name": "android.permission.CAMERA" }, diff --git a/apps/example/react-native.config.js b/apps/example/react-native.config.js index 75794451e..b37d0b9ac 100644 --- a/apps/example/react-native.config.js +++ b/apps/example/react-native.config.js @@ -4,6 +4,8 @@ const project = (() => { return configureProjects({ android: { sourceDir: "android", + // The Java namespace of react-native-test-app's app module, where + // BuildConfig lives (the application id is set in app.json). packageName: "com.microsoft.reacttestapp" }, ios: {