is android:autoVerify="true" placed in the correct intent-filter?
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 48/100
- Issue 類型
- 文件
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- android, react-native
研究方向
從 issue 中連結的 Android deep-linking 設定頁面開始,將其中關於 intent-filter 的指引與 Android app-links 文件進行比較。找到對應的 React Navigation 文件原始碼,根據回報的行為確認哪個 filter 應包含 autoVerify,並更新範例與說明,使文件中的設定明確且不含糊。
由索引模型根據 Issue 內容生成。
描述
deep link setup for android: https://reactnavigation.org/docs/deep-linking/#setup-on-android
says/shows:
Add android:autoVerify="true" to your entry
and this will be the resulst:
<activity
android:name=".MainActivity"
android:launchMode="singleTask">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="mychat" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="www.example.com" />
</intent-filter>
</activity>
here they are placed on the first intent-filter.
however, when looking at the android docs for android app links: https://developer.android.com/training/app-links#android-app-links
they dont place android:autoVerify="true" on the entry(first) intent-filter where we have:
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
they place android:autoVerify="true" on the intent-filter where we add the scheme and host, which is the third one in the react-navigation example.
so their example looks like this:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="myownpersonaldomain.com" />
</intent-filter>
so there is a difference in where react-navigation docs and android docs add android:autoVerify="true".
i believe to match the android docs, react-navigation docs example would have to be updated to:
<activity
android:name=".MainActivity"
android:launchMode="singleTask">
- <intent-filter android:autoVerify="true">
+ <intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="mychat" />
</intent-filter>
- <intent-filter>
+ <intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="www.example.com" />
</intent-filter>
</activity>
thoughts?
EDIT:
i just found this: https://developer.android.com/training/app-links/verify-android-applinks#auto-verification
which says:
When android:autoVerify="true" is present in at least one of your app's intent filters, installing your app on a device that runs Android 6.0 (API level 23) or higher causes the system to automatically verify the hosts associated with the URLs in your app's intent filters.
so maybe its not important which intent-filter you place android:autoVerify="true" after all?
EDIT 2:
from my own personal testing, my android app links only open the app when i place it the way the android docs show. it does not work when i place i the place react-navigation shows.
- 主要語言
- JavaScript
- 星號
- 325
- 分支
- 2k
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
react-navigation/react-navigation.github.io 的其他 Issue
-
Mocking RN NativeAnimatedHelper - path has been changed可能已有人在做 @akkadaya 於 23 天前認領。 未關閉
難度 1/5 1 小時以內 新手友好度 94/100
react-navigation/react-navigation.github.io#1516 · 1 則留言 ·
-
Docs: `overrideScrollViewContentInsetAdjustmentBehavior` option missing from Native Bottom Tab Navigator page可能已有人在做 @dobomode 於 146 天前認領。 未關閉
難度 1/5 1 小時以內 新手友好度 90/100
-
Remove mention of deprecated 'jest-native' in docs可能重新可做 關聯的 PR 已關閉且未合併。 未關閉
難度 1/5 1 小時以內 新手友好度 72/100
-
難度 1/5 1-3 小時 新手友好度 68/100
-
難度 2/5 1-3 小時 新手友好度 72/100
查看 react-navigation/react-navigation.github.io 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
dusk-network/exu#17 ·
-
難度 1/5 1 小時以內 新手友好度 88/100
jspreadsheet/ce#1809 ·
-
documentation
難度 1/5 1 小時以內 新手友好度 91/100
githubnext/gh-aw-workshop#4458 ·
維護者通常 1 天內回覆
-
Add: Cartoonito未關閉check:failed feeds:add
難度 2/5 1-3 小時 新手友好度 63/100
iptv-org/database#37390 · 1 則留言 ·
維護者通常 9 天內回覆
-
bug: directory index route root priority is overwritten when wildcard is false可能已有人在做 @TalhaHunter101 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 84/100
fastify/fastify-static#617 ·