9

I am looking for an example or documentation on how to create a hyperlink to the Android Calendar app's Add Event screen.

For example, in the same way that one can create a call hyperlink with:

<a href="tel:5556665555">Call</a>

I am looking for info on whether it is possible to link to the Android Calendar's Add Event screen, with something like:

<a href="calendar:YYYY-MM-DDThh:mmTZD?end=YYYY-MM-DDThh:mmTZD&name=Appointment>Add Calendar Entry</a>

I am willing to use the Google Calendar Web API specifically, but haven't found any working solution.

Here's a forum post with someone looking for a web-based call that works on Android.

http://www.google.com/support/forum/p/Calendar/thread?tid=6fc0598cd1619e19&hl=en

kg.
  • 633
  • 1
  • 5
  • 17

2 Answers2

1

I think the easiest way would be generate a server side vCal or iCal file download.

For example, Plone CMS does so here:

http://plone.org/events/community/plone-conference-2011

See vCal link.

More info:

https://en.wikipedia.org/wiki/VCal

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
  • 1
    Thank you for the suggestion, Mikko. I tried out the vcal and ical file links from the Plone site on an Android 2.3 phone. It treated them as files with a status of "download failed". I'll keep looking for info. It doesn't look like the Google Calendar app supports Intents outside of a native android app. It does pop up a prompt for google map links (open with browser, google maps, or nav) and youtube videos, for example. – kg. Oct 10 '11 at 05:39
  • Argh. Maybe there is HTTP content-type issue or something. I was pretty sure I had it working in some point. – Mikko Ohtamaa Oct 11 '11 at 07:31
  • Looks like plain-Android 2.x might not support it,but you need an external app to handle the mime-type OR some vendors might have added this in their default app bundles. But I am pretty sure vCal / iCal is stil the format to go, even though you'd need to write tiny bit native code for it. – Mikko Ohtamaa Oct 11 '11 at 08:57
  • Hello Mikko, Im facing this problem right now and opened a question http://stackoverflow.com/questions/11825221/add-calendar-event-to-android-from-web-vcs-download . I tried adding php header("Content-type: text/x-vCalendar; charset=utf-8"); header("Content-Disposition: attachment; filename='london2012.vcs'"); as I see Plone people is doing in their side but still getting blank page. By any chance do you have an idea about what I am missing?, thank you – Santiago Rebella Aug 06 '12 at 11:14
  • Santiago: I suggest you open a new SO question regarding your issue – Mikko Ohtamaa Aug 06 '12 at 12:11
  • Hi Mikko, your solution worked!! needed to add the vcs file into the same index.php, thanks – Santiago Rebella Aug 06 '12 at 12:52
  • Here in Android 4.3, the ICS and VCS aren't working with the Google Calendar app. Anyone found a solution since 2012 ? – RPDeshaies May 12 '14 at 17:09
  • Link http://plone.org/events/community/plone-conference-2011 is offline – Kevin O. Dec 05 '22 at 21:53
  • Yes, we can expect a link that is more than 10 years old to be offline. – Mikko Ohtamaa Dec 05 '22 at 21:58
0

When the WebView is embedded in an android app, a custom URI handler can be set up as a way for the embedded window to invoke Android OS actions, such as a new Calendar Event, through the custom URI.

kg.
  • 633
  • 1
  • 5
  • 17