android - 深层链接仅适用于 GMAIL 应用程序
问题描述
只有在从 Gmail 打开时才能识别深层链接。如果我尝试从 WhatsApp 打开,Messenger 它无法识别这些链接。为什么?
<activity android:name=".main.MainActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:launchMode="singleTask"
android:parentActivityName=".main.MainActivity">
<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"
android:host="*.www.com"
android:pathPrefix="/x" />
<data android:scheme="https"
android:host="www.com"
android:pathPrefix="/x" />
</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"
android:host="*.www.com"
android:pathPrefix="/y" />
<data android:scheme="https"
android:host="www.com"
android:pathPrefix="/y" />
</intent-filter>
</activity>
更新:
我调试了我的代码并发现,当我点击 gmail 中的链接时,我确实有一个类别类型(我稍后会验证它),但是如果我从 slack 或 messenger 打开链接,它是空的。这背后的原因是什么?
解决方案
推荐阅读
- dialogflow-es - 如何在 DialogFlow 实现中编写 Gmail 身份验证代码?
- android - 在活动或片段中初始化房间数据库?
- reactjs - 在 React SPA 中打开图形元标记和 SEO
- c++ - 如何从分叉中检索类的实例?
- pine-script - 如何编写随机 RSI 指标
- typescript - 如何在带有 TypeScript 的 React-Native 中使用 styled-component 键入无状态功能组件?
- docker - 根据环境变量从 dockerignore 中删除特定文件
- react-native - 将 react native app.js 文件连接到使用 react-native-router-flux 的 redux
- security - 蓝牙 LE 特性加密/认证通知不可能?
- python - 如何使用包含 Tensorflow 会话的函数映射数据集?