虽然我已经在谷歌上浏览了应用索引的相关文档
https://developers.google.com/app-indexing/webmasters/details
但仍然感到困惑的是,如果我想接收有关启动器 Activity 的传入数据,并且可以根据对传入 url 的一些内部解析来控制并启动相关 Activity/fragment 。
最佳答案
您必须在单独的 <intent-filter>
中声明操作、类别和数据标签,与启动器规范不在同一个标签中。
<activity>
<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:host="your.domain.com"
android:scheme="http" />
</intent-filter>
</activity>
关于android - 从单个 Activity 在 android 中实现深度链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20560916/