-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
Currently, webcal://
links do not work on Android. Users cannot easily subscribe to event calendars from the schedule page.
Possible Solution
Implement a lightweight JS solution or propose another option that works:
- On iOS/macOS → opens
webcal://
link (native Calendar subscription). - On Android → redirects to Google Calendar subscription:
https://calendar.google.com/calendar/r?cid=<ENCODED_ICS_URL>
. - On Desktop/other → shows a small menu with:
- Google Calendar
- Apple Calendar (webcal://)
Example Snippet
<button id="subscribeCalendar">Add to Calendar</button>
<script>
(function(){
var ICS_URL = 'https://example.com/calendar.ics';
var gcUrl = 'https://calendar.google.com/calendar/r?cid=' + encodeURIComponent(ICS_URL);
var webcalUrl = 'webcal://' + ICS_URL.replace(/^https?:\/\//,'');
var ua = navigator.userAgent.toLowerCase();
if(/iphone|ipad|macintosh/.test(ua)) {
window.location.href = webcalUrl;
} else if(/android/.test(ua)) {
window.location.href = gcUrl;
} else {
// Show menu with Google / Apple / Download links
}
})();
</script>
Metadata
Metadata
Assignees
Labels
No labels