When I share a link to a post on whatsapp for example, it opens in the phone’s browser rather than the discourse hub app even though it’s installed and has the relevant forum connected. This means that they user needs to then log in through the phone’s browser rather than use the app.
Any way to share the link so it points to the App instead?
I’m not sure exactly how this works, do you know @pmusaraj?
Our iOS app has a share extension. It means that on most apps, you would see this when sharing a link:
If you can get whatsapp to show you that Share dialog, then you can send the link to our app. But I don’t seem to be able to do that on my phone on whatsapp.
我认为 @gordon_mrmoco 试图点击 WhatsApp(或短信或任何应用)中的链接,并希望 Discourse Hub 自动打开。
我认为这在 Android 上可以通过应用链接 (https://developer.android.com/training/app-links/) 实现,在 iOS 上可以通过通用链接 (App Search Programming Guide: Support Universal Links) 实现。
在 Android 上:https://developer.android.com/studio/write/app-link-indexing
Android 应用链接是 HTTP URL,可将用户直接带到您 Android 应用中的特定内容。应用链接可以为您的应用带来更多流量,帮助您发现哪些应用内容使用最多,并使用户更轻松地在已安装的应用中分享和查找内容。
要添加对 Android 应用链接的支持:
- 在您的 manifest 中创建 intent filters。
- 在您应用的 activities 中添加代码以处理传入链接。
- 将您的应用和网站与数字资产链接关联起来。
Android Studio 2.3 及更高版本中的应用链接助手通过一个分步向导简化了此过程,如下所述。
在 iOS 上:
要在您的网站和应用之间创建安全连接,您需要建立它们之间的信任关系。您需要分两部分建立此关系:
- 一个
apple-app-site-association文件,您将其添加到您的网站- 一个
com.apple.developer.associated-domains权限,您将其添加到您的应用(这部分在 准备您的应用以处理通用链接 中进行了描述)
设置起来似乎并不难,尽管我认为这需要由 Discourse 团队来设置,一旦设置好,如果安装了 Discourse Hub,它应该允许链接自动在 Discourse Hub 中打开。
编辑:我想这不一定需要由 Discourse 团队来完成,也可以是一个 PR ![]()
实际上,在 DiscourseHub 应用中执行此操作非常困难。我们必须在 com.apple.developer.associated-domains 权限中添加数千个 Discourse 网站域名……通用链接系统并非为此而设计,它是为了将少数几个域名与一个应用关联起来,而不是数千个。
(在 Android 上,这应该可以与 PWA 配合使用。)
哎呀,真遗憾
如果这能在 Android PWA 上运行,那么未来在 iOS PWA 上有希望运行吗?
