Repository navigation
Description
Problem
When both Omi (prod) and Omi Dev (dev) are installed on the same device, Android shows a disambiguation ("chooser") dialog for every deep link — h.omi.me URLs, omi:// scheme links, and OAuth callbacks. The user must manually pick which app handles the link every time.
Root cause: Both flavors register identical deep link config in a single shared AndroidManifest.xml:
- Same custom scheme:
omi:// - Same domains:
h.omi.me,try.omi.me - Same
autoVerify="true"— butassetlinks.jsononly lists the prod signing key, so dev silently fails verification and falls back to the chooser
There are no flavor-specific manifest overlays (app/android/app/src/prod/ or app/android/app/src/dev/).
On iOS, the same issue exists: apple-app-site-association lists only the prod bundle ID (9536L8KLMP.com.friend-app-with-wearable.ios12), so Universal Links never fire for dev builds — they always open in Safari.
Proposed solution
Android
Create flavor-specific AndroidManifest.xml overlays:
app/android/app/src/prod/AndroidManifest.xml
→ host: h.omi.me, try.omi.me
→ scheme: omi
app/android/app/src/dev/AndroidManifest.xml
→ host: dev.h.omi.me (or similar dev subdomain)
→ scheme: omi-dev
Gradle merges these at build time. Prod builds only claim prod domains; dev builds only claim dev domains. No more chooser dialog.
iOS
- Host
dev.h.omi.me/.well-known/apple-app-site-associationwith the dev bundle ID + team ID - Update
Info.plistassociated domains per build config (prod →h.omi.me, dev →dev.h.omi.me)
Flutter (app_shell.dart)
No changes needed — app_links package already handles both schemes transparently. The route handler (openAppLink) parses path segments, not scheme/host.
OAuth callbacks
Update auth_service.dart redirect URI:
- Prod:
omi://auth/callback - Dev:
omi-dev://auth/callback
Read from a config/env constant so the backend knows which redirect URI to accept per environment.
Files to change
| File | Change |
|---|---|
app/android/app/src/prod/AndroidManifest.xml |
New — prod intent filters (moved from main) |
app/android/app/src/dev/AndroidManifest.xml |
New — dev intent filters with dev domain/scheme |
app/android/app/src/main/AndroidManifest.xml |
Remove deep link intent filters (now in flavor overlays) |
app/ios/Runner/Info.plist |
Conditionally set associated domains per build config |
web/ or DNS |
Host dev.h.omi.me with dev AASA + assetlinks |
app/lib/services/auth_service.dart |
Read scheme from config for OAuth redirect URI |
Context
Discovered during PR #4737 (task sharing deep links). Adding /tasks intent filters made the chooser appear for the new route too. Every future deep link feature (#4724 forward/share, conversation sharing, etc.) will hit the same problem until this is fixed.
Activity
beastoin commentedon Feb 12, 2026
Additional finding:
omi://scheme has no host restrictionFrom @kenji's deep link audit —
AndroidManifest.xml:151-156:No
android:hostspecified, so anyomi://*URL opens the app — including potentially crafted links from malicious sources. While the app validates OAuthstateparameters, broadening the scheme to accept any host is unnecessary.Fix (part of the flavor-specific config in this issue):
<data android:scheme="omi" android:host="h.omi.me" /><data android:scheme="omi-dev" android:host="hdev.omi.me" />This restricts the custom scheme to known hosts only.
@Chen (RepoOps), from @kenji's audit