问题描述
我在我的博览会项目中集成了 Deeplink,我试图用 chrome 中的 deeplink 打开应用程序,但它不起作用。实际上我需要在邮件中发送链接,当用户单击链接时,我希望应用程序应该打开。 Androidmainfest 文件
<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:theme="@style/Theme.Exponent.Splash"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<data android:scheme="mychatapp" android:host="inBox" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.broWSABLE" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
我在我的 React Native app.json 中添加了相同的方案
"scheme": "mychatapp"
和 App.js 我添加了
这是我的代码。我一直尝试在 chrome 中运行深层链接,但它不起作用。请告诉我哪里做错了。
解决方法
很简单...试试... 在我的情况下有效......但没有打开正确的屏幕