Android AppLinks 在没有 assetlinks.json 的情况下工作

Android AppLinks work without assetlinks.json

在使用 Android 的 AppLinks 为我的应用开发功能时。我已经意识到它实际上可以在不使用 assetlinks.json 文件的情况下工作。

起初,我认为这是因为我的应用程序是用于调试目的的应用程序,未通过商店签名和发布,并且用于测试目的,Google 决定给我们一些 space 上班。

我发布我的应用程序的那天到了,我将我的应用程序置于 Beta 阶段,从商店安装我的应用程序并点击 https://example.com and I was very surprised to see that I got asked which app I wanted to open this URL even though I had not make the assetlinks.json available from https://example.com/.well-known/assetlink.json

有什么解释吗? 也许检查是完全异步的,如果在某个时候 Google 进行检查并发现你没有这个文件,他们会关闭它直到你修复它并且你必须等到他们下次检查你出来了?

顺便说一句,我已经用 iOS 实现了相同的功能,并且以一种非常苹果风格的方式,你真的无法绕过将你的 apple-app-site-association 文件放在右边发现并从正确的端点提供它。

感谢您的解释:)

纪尧姆。

Is there an explanation to that ?

您描述的是自 2008 年 API 级别 1 以来的行为。

I was very surprised to see that I got asked which app I wanted to open this URL

这叫做"chooser"。 assetlinks.json 背后的要点是 避免选择器 并直接进入您的应用程序。