orca/mobile/plugins
gsxdsm 26121a4315
fix(mobile): respect Android device rotation lock instead of forcing rotation (#5403)
* release: v1.4.48-rc.0 [rc-slot:2026-06-05-15]

* release: v0.0.1-rc.0 [rc-slot:2026-06-06-03]

* fix(mobile): respect Android device rotation lock instead of forcing rotation

The app rotated on Android even when the system auto-rotate lock was on.
Expo's top-level `orientation: "default"` emits `android:screenOrientation="unspecified"`,
which auto-rotates on many devices regardless of the lock, and the
`react-native-screens` `orientation: 'all'` screenOption mapped to FULL_SENSOR,
which forces rotation outright.

react-native-screens exposes no orientation value that honors the rotation lock
(even 'default' calls setRequestedOrientation(UNSPECIFIED) at runtime, overriding
the manifest). The Android value that respects the lock is "fullUser", which must
come from the manifest. So:

- Add an `android-respect-rotation-lock` Expo config plugin that sets the main
  activity to `android:screenOrientation="fullUser"` (honors the lock; allows all
  orientations when unlocked, matching iOS).
- Remove the runtime `orientation` screenOption so the manifest value governs.

iOS behavior is unchanged (UISupportedInterfaceOrientations still lists all four).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 13:45:58 -07:00
..
android-respect-rotation-lock.js fix(mobile): respect Android device rotation lock instead of forcing rotation (#5403) 2026-06-15 13:45:58 -07:00