HomePhabricator
Diffusion Comm afb9582081b9

[native] Add URI scheme to debug AndroidManifest.xml

Description

[native] Add URI scheme to debug AndroidManifest.xml

Summary:
Resolves ENG-2731

Added the comm:// URI scheme to debug AndroidManifest.xml

  • Followed the instruction from Setup Android URI scheme and the "Android Guide" linked there.
  • Added the <intent-filter> to src/debug/AndroidManifest.xml as suggested above, used Manifest merging to ensure it is applied correctly
  • Removed the leftover intent filter from src/main/AndroidManifest.xml - this wasn't fully removed in D1447 and Android Studio was signaling missing "data" attribute. This can be added back when necessary, it doesn't collide with my debug intent filter.

Test Plan:

  • Build the app in Android Studio, install on emulator -
cd native
yarn dev --scheme comm
  • Press the a (or shift+a for device select) key in Metro console to open the deeplink. The Comm app should open and skip the Expo launcher screen.

Manifest correctness was checked in Android Studio using "merge view":

Screenshot 2023-01-20 at 12.48.30.png (342×668 px, 66 KB)

Darker is the main manifest, while lighter blue is the debug one.

It is also possible to check if Expo's scheme utility uri-scheme detects it correctly:

$ npx uri-scheme list --manifest-path ./android/app/src/debug/AndroidManifest.xml
› Android: Schemes for config: ./android/app/src/debug/AndroidManifest.xml
› comm://

Reviewers: ashoat, atul

Reviewed By: ashoat, atul

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D6320

Details

Provenance
bartekAuthored on Jan 20 2023, 3:21 AM
Reviewer
ashoat
Differential Revision
D6320: [native] Add URI scheme to debug AndroidManifest.xml
Parents
rCOMMc78260547876: [native] Add URI scheme to debug Info.plist
Branches
Unknown
Tags
Unknown