【发布时间】:2018-11-06 21:00:36
【问题描述】:
我有一个 React 原生 Android 应用,我想从通过 SMS 发送的链接(深度链接)打开它。
我在网上进行了研究,并在 AndroidManifest 文件中添加了以下内容 - (Application/Activity)。
<intent-filter android:label="filter_react_native">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="xxxxnativeapp" android:host="createpassword" />
</intent-filter>
有没有什么方法可以通过从一部手机向另一部手机发送带有链接的短信来测试这一点。如果是这样,我如何创建可以作为 SMS 发送的链接 xxxxnativeapp://createpassword
只是为了测试。这应该会打开应用程序。
只是为了测试,我尝试创建一个 Native android 应用程序,以便在文本视图中有一个 href,它会打开一个 URL 而不是应用程序。我认为从另一个应用程序打开一个应用程序与
从链接打开应用程序。如果我错了,请纠正我。
我也尝试通过 gmail 发送xxxxnativeapp://createpassword,但我没有成功,因为如果我以这种方式发送,gmail 会删除链接。
抱歉,我太新了,所以想知道是否有人尝试从作为 SMS 发送的链接打开应用程序。
请建议我如何测试它。
谢谢 回复
【问题讨论】:
标签: android react-native sms react-native-android deep-linking