gpt4 book ai didi

Android 应用与 Github 页面的链接

转载 作者:行者123 更新时间:2023-12-05 00:12:39 24 4
gpt4 key购买 nike

我想做什么

我已成功为我的应用设置深层链接:打开链接时,系统会要求用户选择打开方式:使用我的应用或浏览器。

我想使用新的 App Links功能,如果安装了应用程序,它会自动打开。

为此,文档指出我应该在我的服务器上创建这个文件:

https://hostname/.well-known/assetlinks.json .

问题

问题在于 intent-filter 数据部分的定义如下:

<data android:scheme="https"
android:host="myGithubUsername.github.io"
android:pathPattern="/appname/groups/.*/join"/>

因为我的网站托管在 Github Pages 上。

所以这行不通,因为文件必须在 https://myGithubUsername.github.io 中,但我的网站实际上是 https://myGithubUsername.github.io/应用名称

另一种方法是设置 android:host="https://myGithubUsername.github.io/appname" - 但它不起作用。应用根本不会打开该链接。

有没有办法将 Android 应用链接与 Github 页面一起使用?

最佳答案

您可以将 Android Applink 与 Github Page 一起使用。只需在您的根文件夹中创建一个名为 _config.yml 的文件,其中的值是 include: [".well-known"]。这是例子

https://github.com/trungnn307/trungnn307.github.io/blob/master/_config.yml enter image description here

关于Android 应用与 Github 页面的链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48541106/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com