我需要在我的应用程序中打开来自 chrome 或任何浏览器的所有 URL。我如何在 Android 中执行此操作?
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:path="/.*"/>
<data android:pathPattern="/Android" />
</intent-filter>
目前我正在我的项目中使用上面的代码。这会将所有链接从其他应用程序重定向到我的应用程序。但不是来自 Chrome。
最佳答案
你想要的是不可能的。没有要求浏览器一定要注意可能对 URL 感兴趣的任何其他应用程序。特别是,Chrome 似乎假定所有 http
/https
URL 都只是作为网页从 Internet 加载。其他浏览器的行为方式可能相同。
关于android - 将所有 URL 重定向到我的应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30446392/