问题
We have some href's linking to .ics files and google calendar etc. Everything works perfectly on the web and iOS devices. However, when linking to "Add to calendar" from Android 6.0+ within chrome, it auto opens the Google Calendar, which is expected, but then it just says "Event not found".
Our links are setup the same way as suggested answer in: Link to add to google calendar
Doing some research there looks to be some issues with Android 6.0 and google calendar, but I'm wondering if on an Android 6.0+ device if anyone has found a workaround solution to get "Add to calendar" href link to add an event to the native google calendar app?
回答1:
For anyone else searching for a solution I ended up using: http://addtocalendar.com/
It's a free service and seems to use the browser interface for adding Calendar events on Android.
回答2:
The reason the addtocalendar library works is simply because it uses a different link structure that doesn't prompt mobile users to open in app: https://calendar.google.com/calendar/render?action=TEMPLATE&...
. You can skip using that library and just swap in this base link structure.
There's a warning that pops up on the google calendar page this links to that things won't be rendered perfectly on mobile because it's the desktop view, but it works.
来源:https://stackoverflow.com/questions/35853870/href-to-add-to-calendar-from-web-not-working-with-native-google-calendar-app-o