简体   繁体   English

通过<a>链接网站</a>订阅 ics 日历 URL

[英]Subscribing to ics calendar URL via <a> link website

for an online calendaring website we offer our visitors to "Subscribe to the calendar" using their native Calendar app.对于在线日历网站,我们为访问者提供使用其本机日历应用程序“订阅日历”的功能。

On iOS, this is pretty easy, as iOS recognises the iCal format, and everything is handled perfectly.在 iOS 上,这很容易,因为 iOS 识别 iCal 格式,一切都处理得很好。

On Android however, the iCal/webcal file is downloaded, and thus not kept in sync with any changes.然而,在 Android 上,下载了 iCal/webcal 文件,因此不会与任何更改保持同步。

We'd like to offer a solution to Android visitors which is just as easy as on the iOS platform.我们想为 Android 访问者提供一个解决方案,就像在 iOS 平台上一样简单。 When a user clicks the "Subscribe" link on the webpage, it should open up the native Calendar app, which in turn registers the subscription to the ical, and keeps all events in sync.当用户点击网页上的“订阅”链接时,它应该打开本机日历应用程序,该应用程序又将订阅注册到 ical,并使所有事件保持同步。

Any help is much appreciated.任何帮助深表感谢。

The correct way is to offer a webcal:// URL that the browser hands off to the calendaring application, without downloading it first.正确的方法是提供一个webcal:// URL,浏览器将其交给日历应用程序,而无需先下载它。 This works fine for iOS and desktop browsers when a calendaring application is installed.安装日历应用程序后,这适用于 iOS 和桌面浏览器。

Android is a different beast because there is no default handler for webcal:// URLs installed. Android 是一个不同的野兽,因为没有安装webcal:// URL 的默认处理程序。 There are apps like iCSx5 that provide the webcal handler, but they need to be installed by the users before the links work.有提供 webcal 处理程序的 iCSx5 等应用程序,但用户需要在链接工作之前安装它们。

But because most Android phones are tied to a google account, providing a "Subscribe with Google calendar" link as second option is helpful:但是因为大多数 Android 手机都与谷歌账户绑定,提供“订阅谷歌日历”链接作为第二个选项是有帮助的:

https://calendar.google.com/calendar/r?cid=webcal%3A%2F%2Fexample.org%2Fcalendar.ics

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM