Skip to content

fix(mobile): mark Wi-Fi and portrait screen optional so Play can send releases for review - #47937

Merged
AmoabaKelvin merged 1 commit into
mainfrom
android-optional-hardware-features
Nov 24, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
android-optional-hardware-features

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

Google Play won't send our production release for review. It says the app "requires" Wi-Fi and a portrait screen, which hides it from devices without them. We never asked for either. Android assumes both: Wi-Fi because we read the Wi-Fi state, and portrait because Google's QR and document scanner screens are portrait-only. This marks both as optional, so Play stops blocking the release and the app can install on those devices.

Files Added Deleted Net
Test 0 0 0 0
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​22 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​22

What changed

A small config plugin (mobile/plugins/android-optional-hardware-features.js) adds <uses-feature android:required="false"> for android.hardware.wifi and android.hardware.screen.portrait. When a feature is declared explicitly, Android no longer infers it as required.

Why

Play Console blocks sending the 0.0.69 production release for review:

Required hardware feature declarations are restricting your app's availability … android.hardware.screen.portrait … android.hardware.wifi

aapt2 dump badging on the published 0.0.69 APK shows where each one comes from:

  • android.hardware.wifi: implied by ACCESS_WIFI_STATE (from expo-network)
  • android.hardware.screen.portrait: implied by ML Kit's GmsBarcodeScanningDelegateActivity and GmsDocumentScanningDelegateActivity, which set screenOrientation="portrait". Our own MainActivity uses fullUser.

Both have been in the app since before 0.0.65. Play has started blocking on them, so the app didn't change.

Performance

None, because it only adds two manifest lines at build time; no runtime code changes.

Risk

Low. It's a manifest-only change. The app works on mobile data, and the scanner screens still open in portrait. Devices without Wi-Fi or a portrait screen can now install the app. Camera and microphone stay implied as required, and Play didn't flag them.

Testing

  • Ran the plugin against sample manifests. It adds both entries, and it flips an existing required="true" to false.
  • A validate-only Android release build of this branch is running. I'll confirm on that build's bundle that both features show as not required.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Expo configuration now registers an Android config plugin. The plugin uses withAndroidManifest to update existing Wi-Fi and portrait-screen feature entries or add missing entries, setting android:required to false.

Merge Risk: Minimal · up to 0bfc5

This change marks Wi-Fi and portrait-screen hardware as optional in the Android manifest so Play Console does not treat them as required for app availability. No concrete code risk was found. Before merging, add the Performance section to the PR description so the failing description check passes.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description covers the problem, the mechanism, and the rationale in detail. It explains the Play Console block, names the sources of the implied features (expo-network for Wi-Fi, ML Kit scanner ac… 1. Add a linked issue number in the "Fixes #" line. Outside contributors need an actual issue; the PR will be ignored otherwise.
2. Add a Visual Proof section. Write N/A and a short reason, because the change is manifest-only with no UI cha…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the main change: a fix in the mobile app that marks Wi-Fi and portrait screen hardware features optional so Google Play can send the release for review. The title matches the manifest-…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a fix in the mobile app that marks Wi-Fi and portrait screen hardware features optional so Google Play can send the release for review. The title matches the manifest-only config plugin in the changeset and the stated objective. The title is 89 characters, which is slightly long but still clear.

Full details: Description check

Explanation

The description covers the problem, the mechanism, and the rationale in detail. It explains the Play Console block, names the sources of the implied features (expo-network for Wi-Fi, ML Kit scanner activities for portrait), and gives a low risk assessment. It also includes a performance line and a testing section. Several template sections are missing or incomplete: the Linked Issue section has no issue number ("Fixes #" is blank), and the Visual Proof section is absent (the change is manifest-only, so it should read N/A with a reason). The Testing section lacks the template checkboxes and the platforms tested. The Risk section has no Level: value. The AI Disclosure section is missing. The Review and Agent skill upstream boundary sections are absent. The Checklist is absent.

Resolution

  1. Add a linked issue number in the "Fixes #" line. Outside contributors need an actual issue; the PR will be ignored otherwise.
  2. Add a Visual Proof section. Write N/A and a short reason, because the change is manifest-only with no UI change.
  3. In the Testing section, state which platforms were tested. Check the template boxes that apply. Note that the validate-only release build is still pending.
  4. In the Risk section, set the Level: field. The author wrote Low in the text, but the field needs an explicit value.
  5. Complete the AI Disclosure section, or leave it empty only if the author is a StablyAI team member.
  6. Add the Review and Agent skill upstream boundary sections, and tick the applicable box.
  7. Add the Checklist section, or confirm each item is satisfied before merge (pnpm lint, typecheck, test, and build).
Finishing Touches

Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5b60a4a2-e0fa-4a55-a7d2-6af0e0607609
Commits

Reviewing files that changed from the base of the PR and between b2065bb and 0bfc572.

Files selected for processing: 2

  • mobile/app.json
  • mobile/plugins/android-optional-hardware-features.js

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

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