我正在尝试在我的应用中获得深层链接.
从我读的here开始,就可以在应用程序中添加Intent过滤器了.我尝试过,它工作正常:
android:host="www.example.com"
android:pathPrefix="/gizmos" />
在here阅读“数字资产链接”时,它说:
Website A declares that links to its site should open in a designated
app on mobile devices, if the app is installed.
这涉及将assetlinks.json上传到我的服务器.
但是如果意图过滤器已经打开我的应用程序,我无法看到这样做的好处,那么有什么意义呢?
解决方法:
Android 6.0 (API level 23) and higher allow an app to designate itself as the default handler of a given type of link. If the user doesn’t want the app to be the default handler, they can override this behavior from Settings.
Automatic handling of links requires the cooperation of app developers and website owners. A developer must configure their app to declare associations with one or more websites, and to request that the system verify those associations. A