最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Add event to calender from within a browser on mobile platforms - Stack Overflow

programmeradmin2浏览0评论

i'm working on a mobile site that lists events. I thought that putting together an ICS file, which contains all the information for a specific event, and linking to that file would be enough to have the OS handle the ICS file and add that information to the calendar.

This works on Desktop Computers where the Browser asks if i would like to open the ICS file with a calendar application currently installed.

On android and iOs this does not work at all.

This is what i get on android:

  • Chromebrowser - can't download the file; says download failed
  • Firefox - downloads the ICS file and opens it with a text editor
  • Opera - downloads the ICS file and opens it with a text editor

iOs: downloads the file and does nothing

So, is there a way to serve that info to the user so he/she can add that event to his/hers calendar? (like a JS Framework)

i'm working on a mobile site that lists events. I thought that putting together an ICS file, which contains all the information for a specific event, and linking to that file would be enough to have the OS handle the ICS file and add that information to the calendar.

This works on Desktop Computers where the Browser asks if i would like to open the ICS file with a calendar application currently installed.

On android and iOs this does not work at all.

This is what i get on android:

  • Chromebrowser - can't download the file; says download failed
  • Firefox - downloads the ICS file and opens it with a text editor
  • Opera - downloads the ICS file and opens it with a text editor

iOs: downloads the file and does nothing

So, is there a way to serve that info to the user so he/she can add that event to his/hers calendar? (like a JS Framework)

Share Improve this question edited Sep 19, 2011 at 17:49 Trott 70.3k27 gold badges182 silver badges217 bronze badges asked Sep 8, 2011 at 10:32 user690945user690945 511 silver badge2 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

I think it all depends on the browser and device setup and/or whether they have the capability. There is no universal way to force an ics file to be added/subscribed to or imported into someone's calendar app.

Desktop browsers by default are set to pass the ics link to whatever they think your calendar application is. (But I For example always open ics files in notepad for testing purposes )

Apparently iphone auto subscribe used to work, but no longer does: http://blog.fosketts/2011/01/13/apple-breaks-ics-calendar-autosubscription-ios-42/ People now have to 'subscribe' or import very deliberately.

This may be for good 'privacy' reasons - I can imagine many folks may click on a link without realising that it is going to load events into their calendar.. could be bad.

They only way that I know of that can be done more directly is for google calendar - what I call the "add to google" option. - one just needs to create a link with the right parameters and if people are logged in to gooogle, it will start creating an event with those details - the user still has to 'save' of course.

ONe possibility that may work a little better is to have a link that 'emails' them the isc file. Some email applications expect to deal with ics invites.

https://discussions.apple./message/10022359#10022359

http://www.fulltimecasual./apple/iphone/accepting-ics-invitations-on-iphone

I'd be interested to know how you go with this. If you find out any more or e up with an alternative plan, please post back here.

"It could get messy:" http://www.zimbra./forums/administrators/17564-invites-ics-files-auto-populate-calendar.html

发布评论

评论列表(0)

  1. 暂无评论