问题描述
intent:#Intent;package=com.my.package;action=redeye.com.test;category=android.intent.category.DEFAULT;category=android.intent.category.broWSABLE;S.token=$TOKEN;end
在清单中我为主要活动设置了这个标签
<intent-filter>
<action android:name="redeye.com.test" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.broWSABLE" />
</intent-filter>
<intent-filter>
但重定向后无法打开我的应用
解决方法
您似乎正在寻找新的 Android Intents 链接,该链接将为设备创建明确的链接意图。
<a href="intent://<URL>#Intent;scheme=http;package=com.android.chrome;end">
对我有用。所以
<a href="intent://stackoverflow.com/questions/29250152/what-is-the-intent-to-launch-any-website-link-in-google-chrome#Intent;scheme=http;package=com.android.chrome;end">
将带您在 Chrome 中回答这个问题。请注意,方案是单独指定的,因此如果您想启动 https 链接,您必须将方案更改为 scheme=https
但正如大家所说,明确的 Chrome 意图是非常非 Android 的事情。更好的方法是像这样指定 ACTION_VIEW 操作:
<a href="intent://stackoverflow.com/questions/29250152/what-is-the-intent-to-launch-any-website-link-in-google-chrome#Intent;scheme=http;action=android.intent.action.VIEW;end;">
来源: link