41

We offer our clients the ability to subscribe to an iCalendar/VCalendar feed on their devices using a webcal:// link

We have a nice simple button that says "subscribe to this calendar", they click on it and their calendar app sucks in the data - voila.

This works great on most devices, but we've found it fails miserably on android devices.

On the default Android browser it gives a "Webpage not available" error which doesn't help our users.

On Chrome on Android it doesn't do anything when they click on the button, it just sits there and if I paste the webcal:// link into Chrome's address bar it looks it up in google instead of loading the cal feed.

If I use http:// it will display the feed contents in the webpage but won't trigger the calendar to subscribe to it which isn't very useful for our less savvy users.


So my question is: Is there a supported calendar feed type for Android that works without the user having to manually copy the link code from the web app, then open their calendar app and, click to add a subscription and then paste in the link?

At this point the best alternative I have is to detect the browser type and if it is Android pop up a window with the link code for users to copy and to give them instructions to go find the subscribe link in their cal and paste in the link. I know this is going to result in lots of support calls from less technical users though so I'd rather not :)

Thanks!

salonMonsters
  • 1,237
  • 3
  • 16
  • 26
  • 4
    There are hundreds of calendar apps, pre-installed on devices and installed by users from the Play Store and elsewhere. Each can do what it wants. The AOSP Calendar app [source code is here](https://android.googlesource.com/platform/packages/apps/Calendar.git/+/master), and it only supports Google Calendar URLs (`https://www.google.com/calendar` prefix). If you want to find out what other calendar apps do, you'll need to ask the developers of such apps. – CommonsWare Apr 15 '14 at 18:46
  • Ok, so based on that it sounds like my only real option is to detect android devices and provide the user the feed link to copy - what a shame there isn't a cleaner way to do this. It seems like it must be a common issue. – salonMonsters Apr 15 '14 at 18:53
  • 3
    There may be calendar apps that specifically support `webcal:`, or helper apps that accept `webcal:` and route the calendar entry to the AOSP's app's standard calendar storage (`CalendarContract`). Poke around on the Play Store and see what you find, or ask on [the Software Recommendations StackExchange site](http://softwarerecs.stackexchange.com/). With luck, you can find some stuff that you can recommend to users to help simplify the process, if they will be doing this a lot with your Web site. – CommonsWare Apr 15 '14 at 18:57
  • Good suggestion CommonsWare, it could be helpful just to be able to direct people to a cal app that does support webcal: I see that webcal: is not actually a standard currently which is maybe why it isn't supported: " It is not an official URI scheme, such as http and ftp, as registered with IANA. Webcal schema current status is Provisional under IANA website." – salonMonsters Apr 15 '14 at 19:32
  • 1
    or you could simply offer a standard calendar link ? the http:// ....ics with the right calendar headers – anmari Oct 02 '14 at 01:06
  • 2
    @CommonsWare Indeed there are apps which handle that sort of conversion for you. I find it odd that AOSP can't do that itself. [research] It [looks like](https://android-review.googlesource.com/#/c/88711/) there's a patch to [do just that](https://android-review.googlesource.com/#/c/88711/3/AndroidManifest.xml). I wonder why it hasn't been merged. – Michael Oct 03 '14 at 18:16
  • You can import a standard *.ics calendar into Google Calendar, and from there it is possible to obtain a Google Calendar link that will allow Google Calendar users to easily subscribe to the calendar, which may be an option. Alternatively, it might be possible to use the Google Calendar API to add the events to the user's calendar. – Michael Aaron Safyan Feb 06 '15 at 10:15

2 Answers2

3

As the webpage says

Android phones do not support webcals. However, you can subscribe the calendars to Microsoft Outlook or Google Calendar and then synchronize GoogleCalendar with Android. Also, you can install ICSSync on your device and then add calendar links to that app.

https://www.webcal.guru/en-US/help?question_id=subscribe

Calion
  • 243
  • 2
  • 13
Seïfane Idouchach
  • 620
  • 2
  • 5
  • 21
1

As pointed out by @Seïfane Idouchach Android browsers doesn't support webcal feed.

Workaround:

  1. Use http:// instead of webcall://
  2. Setting header to 'Content-Disposition: attachment' to make it force save the file on android devices. (You may also want to set the filename header).
  3. Now due to the above two steps, android client would download the file.
  4. Once downloaded, users can click the file to add them to calender app.
Joshua Drake
  • 2,704
  • 3
  • 35
  • 54
D34dman
  • 1,241
  • 9
  • 12
  • 32
    The problem with this approach is it wouldn't trigger an actual subscription but only a one-time download. – Mike N Feb 08 '16 at 13:29