单击链接时未启动InstantApp [英] InstantApp not being launched when clicking on link
问题描述
我的测试应用发布在Google Play(测试版)的测试封闭轨道中-但我也尝试过内部测试,结果相同.
My test app is published in a test closed track in Google Play (alpha) - but I've also tried with Internal Testing, the same result.
它已经显示了立即尝试"按钮.修复缺少的默认URL之后. assetlinks.json
放在我服务器的正确位置.App Links Assistant流程已完全配置.
It already shows the button "try now" after fixing the missing default-URL. assetlinks.json
placed on my server in the right place. The App Links Assistant process fully configured.
我还不能公开发布我的应用.
I can't release my app publicly yet.
我的即时应用链接看起来像这样: https://my.host/my/path?paramA=1
My instant app link looks something like this: https://my.host/my/path?paramA=1
在我的Instant模块清单中,我声明:
On my Instant module manifest i declared:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="http"
android:host="my.host"
android:pathPrefix="/my/path"/>
<data
android:scheme="https"/>
</intent-filter>
<meta-data
android:name="default-url"
android:value="https://my.host/my/path" />
我已按照Google Play的加入要求成为我自己的应用的测试人员.
I've followed the google play opt-in to become a tester of my own app.
我非常有信心将其正确集成,因为:
I'm fairly confident I've integrated it correctly because:
-
如果我从Google Play页面上点击立即尝试,则我的即时应用程序将打开(Android会将其保留在缓存中).然后,如果我打开链接(例如从电子邮件中获取链接),则效果很好:按我的期望打开即时体验(可能是因为它在缓存中).
If I click on try now from the Google Play page my instant app will open (and Android will keep it in cache). If I then open the link (for example from an email), it works fine: opens the instant experience as I expect (probably because it is in the cache).
如果我安装了完整的应用程序,则打开链接可以正常工作:在应有的位置打开该应用程序.
If I have the full app installed opening the link works fine: opens the app where it should go.
但是...
- 如果我从未打开过即时软件(已从设备的缓存中删除)也未安装应用程序,则打开链接不会将我带到即时应用程序(应从GooglePlay加载即时应用程序,因为您没有它)而是将我带到该网站.
有人对官方文档?
InstantApps版本 com.google.android.gms:play-services-instantapps:17:0.0
InstantApps version com.google.android.gms:play-services-instantapps:17:0.0
其他信息,Google Play上用于即时应用程序的选项已启用,我已经尝试关闭然后再打开.
extra info, the option on Google Play for instant apps is on and I already tried turning off and back on.
如果您认为我忽略了重要细节,请评论我的问题,我会尝试添加它们
谢谢.
推荐答案
在寻找答案时,我试图从我发现该功能有效的应用程序开发人员中找到一些东西.我发现了这篇文章,我发现只有两个区别我在做:
While searching for an answer I tried to find something from the devs of the apps that I saw this feature working. I found this article and I notice only two differences from what I was doing:
-
android:order ="1"
,我从没用过,所以我看了看能做什么,据我所知,在可以通过倍数访问的深层链接的情况下可以赋予优先级"的应用给你的.默认值为0.
android:order="1"
, I never used so I looked to see what does and as far as I understood, in case of deep link that can be access by multiples apps this can give "priority" to yours. The default value is 0.
android:pathPattern ="/item/.*"
我正在使用"android:pathPrefix"最后没有.*的代码.由于我的网址也有参数,因此我决定尝试此修改.
android:pathPattern="/item/.*"
I was using "android:pathPrefix" on mine without .* in the end. Since my url also has params I decided to try this modification.
- 我注意到的一件事是,即使在发布后也不能立即工作,因为我周一在尝试一个周末时正在工作,所以显然GooglePlay也有一些索引时间.
我的测试应用正在内部测试中,并且正在运行.
My test app is on Internal Testing and is working.
这篇关于单击链接时未启动InstantApp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!