Skip to content

fix(android): declare screen.portrait and wifi as optional features for Google Play - #2909

Merged
MusabShakeel576 merged 1 commit into
masterfrom
claude/ecstatic-ritchie-lpkllg
Nov 24, 2026
Merged

MusabShakeel576 merged 1 commit into
masterfrom
claude/ecstatic-ritchie-lpkllg

Conversation

@MusabShakeel576

@MusabShakeel576 MusabShakeel576 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Why

Play Console blocked the 2.2.0 release from being sent for review:

Required hardware feature declarations are restricting your app's availability

  • android.hardware.screen.portrait affects Phone, Tablet, Desktop, and Android XR users
  • android.hardware.wifi affects Phone, Tablet, Desktop, and Android XR users

We don't declare either feature anywhere. Google Play infers both, and treats both as required:

Feature Inferred from
screen.portrait orientation: 'portrait' in app.config.ts, which locks MainActivity to portrait
wifi the ACCESS_WIFI_STATE permission that @react-native-community/netinfo adds

Both were in place before 2.1.0, so this is Play's newer availability check, not a 2.2.0 regression. The Wirex Android SDK's manifest declares no features or permissions.

What

  • New plugin, plugins/withOptionalHardwareFeatures.js. It declares both features with android:required="false". An explicit declaration stops Play inferring the feature, so:

    • the portrait lock and the permission stay;
    • the install restriction goes.

    It also sets tools:replace="android:required", so a library that declares either feature as required can't merge it back to required. It adds the tools namespace the override needs, following withMlkitVisionDependencies.

  • Registered in app.config.ts, with a comment beside the entry.

Following increase app availability, the app needs neither feature. It works over any network, and on a device without a portrait screen Android shows the portrait layout letterboxed.

Checked

  • expo prebuild --platform android produces a manifest with:
    <uses-feature android:name="android.hardware.screen.portrait" android:required="false" tools:replace="android:required"/>
    <uses-feature android:name="android.hardware.wifi" android:required="false" tools:replace="android:required"/>
    This used a placeholder google-services.json, and the generated android/ folder was removed afterwards.
  • Prettier passes on both files, and ESLint passes on app.config.ts.
    • ESLint can't run on plugins/*.js in this repo: the existing withMlkitVisionDependencies.js fails the same way, with "could not find plugin @typescript-eslint". That's a config gap, not this file.
  • Not run: a Gradle build with the final merged manifest, because there's no Android SDK here. The EAS Android build after merge is that check.

After merge

  1. "Deploy mobile" builds a new 2.2.0 Android bundle with a new versionCode and submits it to the internal track.
  2. In Play Console, replace the blocked bundle in the draft 2.2.0 release with the new one.

The config change probably also changes the iOS fingerprint, so expect a new iOS 2.2.0 build too.


Generated by Claude Code


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Compatibility
    • Android distribution no longer marks portrait-orientation or Wi-Fi hardware as required. This may allow the app to be available on devices that do not declare one or both of these hardware features.
    • Devices that support these features can continue to use the app as before.

…or Google Play

Play Console blocked the 2.2.0 review with "Required hardware feature
declarations are restricting your app's availability" for
android.hardware.screen.portrait and android.hardware.wifi (Phone,
Tablet, Desktop, Android XR). Neither is declared anywhere; Play infers
both as required:

- screen.portrait from `orientation: 'portrait'`, which locks
  MainActivity to portrait;
- wifi from the ACCESS_WIFI_STATE permission that
  @react-native-community/netinfo adds.

Both predate 2.1.0, so this is Play's newer check, not a regression.

A new config plugin declares both with android:required="false" (plus
tools:replace so a library can't OR it back to required). An explicit
declaration stops Play inferring the feature, so the portrait lock and
the permission stay while the install restriction goes. Checked with
`expo prebuild --platform android`: the generated manifest carries both
<uses-feature> entries and the tools namespace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015YMpaaKrSMPdcrBZg2i498
@vercel

vercel Bot commented Nov 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
solid-app Ignored Ignored Nov 23, 2026 1:45pm UTC
solid-app-staging Ignored Ignored Nov 23, 2026 1:45pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Expo config registers an Android manifest plugin. The plugin adds or updates portrait-screen and Wi-Fi feature declarations so both are marked as not required.

Changes: Android hardware feature declarations

Layer / File(s) Summary
Register plugin and update manifest
app.config.ts, plugins/withOptionalHardwareFeatures.js
The Expo config registers the plugin. The plugin declares the tools namespace and adds or updates portrait-screen and Wi-Fi entries with android:required="false" and tools:replace="android:required".

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: claude, fuseiosa

Merge Risk: Minimal · up to d7b19

This change declares portrait-screen and Wi-Fi as optional Android features so Google Play stops restricting device availability. I found no concrete merge risk. The final merged manifest will be validated by the post-merge Android build.

Pre-merge checks: Passed 6

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
Backend Contract Match Passed The check applies only when the PR adds or changes a call to a Solid-Money/solid-backend endpoint. The PR changes two files: app.config.ts (registers a plugin) and a new `plugins/withOptionalHardwar…
Contract Abi Match Passed The check applies only when an ABI, contract call, or address changes. The committed PR range changes two files: app.config.ts (modified) and plugins/withOptionalHardwareFeatures.js (added). Neith…
No Secrets Or Sensitive Data Leaks Passed The PR changes two files: app.config.ts (adds one plugin path with a comment) and a new plugins/withOptionalHardwareFeatures.js. I read the full patch for both files. Neither adds a hardcoded secr…
Full details: Backend Contract Match

Explanation

The check applies only when the PR adds or changes a call to a Solid-Money/solid-backend endpoint. The PR changes two files: app.config.ts (registers a plugin) and a new plugins/withOptionalHardwareFeatures.js (an Expo Android manifest plugin that declares android.hardware.screen.portrait and android.hardware.wifi as android:required="false"). The committed diff contains no fetch, HTTP client, endpoint path, or backend request code. The only keyword matches were a Android developer documentation URL in a comment and the http://schemas.android.com/tools namespace constant. No API calls changed, so the check passes.

Full details: Contract Abi Match

Explanation

The check applies only when an ABI, contract call, or address changes. The committed PR range changes two files: app.config.ts (modified) and plugins/withOptionalHardwareFeatures.js (added). Neither touches contract code. A diff scan for ABI, contract, address, event, and read/write contract terms matched only comment text in the new plugin ("restricting your app's availability" and an increase-app-availability URL). No ABI, contract call, event listener, or contract address changed. The check is not triggered, so it passes. No comparison with Solid-Money/boring-vault was needed.

Full details: No Secrets Or Sensitive Data Leaks

Explanation

The PR changes two files: app.config.ts (adds one plugin path with a comment) and a new plugins/withOptionalHardwareFeatures.js. I read the full patch for both files. Neither adds a hardcoded secret, private key, mnemonic, server-side API key, or an EXPO_PUBLIC_* variable holding a secret. The new plugin only edits the Android manifest. It sets xmlns:tools and uses-feature entries for android.hardware.screen.portrait and android.hardware.wifi with android:required="false" and tools:replace. It does not log, print, or send any data to analytics. The PR description mentions a placeholder google-services.json used during a local prebuild. That file is not in the diff, and it holds no real credentials. No failure condition in the check is met.

Finishing Touches

Generate unit tests (beta)

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

Warning

Linked repositories: This review skipped 1 repository. Cross-repository analysis may be incomplete. Check linked repository access and settings.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3a571c8 and d7b1923.

Files selected for processing: 2

  • app.config.ts
  • plugins/withOptionalHardwareFeatures.js
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Recent review details

Additional context used

Path-based instructions: 2

Flag changes that look committed by mistake: console.log/debugger left from debugging, commented-out code, hardcoded test or mock values, temporary flags left enabled, .only/.skip on tests, bypassed auth or validation, local URLs/IPs, and s...

CodeRabbit configuration file

Files:

  • app.config.ts
Backend contract match: Fail if the PR adds or changes a call to a Solid-Money/solid-backend endpoint that, according to the backend's default branch, does not exist, uses a different HTTP method, omits a required request field, or reads a...

CodeRabbit inference engine (Custom checks)

Files:

  • app.config.ts
  • plugins/withOptionalHardwareFeatures.js
Additional comments: 2

app.config.ts: 1

345-349: LGTM!

plugins/withOptionalHardwareFeatures.js: 1

1-60: LGTM!

@MusabShakeel576

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor
Action performed

Full review finished.

@MusabShakeel576
MusabShakeel576 merged commit 5d6ac9d into master Nov 24, 2026
6 checks passed
@MusabShakeel576
MusabShakeel576 deleted the claude/ecstatic-ritchie-lpkllg branch November 24, 2026 07:06
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