Phonegap plugin to add events to the android calendar
JavaScript Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Calendar Plugin for Phonegap

(c) 2013 Ten Forward Consulting, Inc. released under the MIT License

Authored by Brian Samson (@samsonasu) and Ryan Behnke

This plugin is compatible with PhoneGap 2.0, and the api was based on the corresponding iOS plugin

Adding the Plugin to your project

  1. To install the plugin, add calendar.js to your index.html and to your www folder:

<script type="text/javascript" src="calendar.js"></script>

  1. Add to your Android project in src/com/tenforwardconsulting/phonegap/plugins

  2. Map the plugin in res/xml/config.xml:

    <plugin name="CalendarPlugin" value="com.tenforwardconsulting.phonegap.plugins.CalendarPlugin"/>


Create an object to be used to call the defined plugin methods.

var startDate = new Date("August 20, 2013 10:00:00");
var endDate = new Date("August 20, 2013 11:00:00");
var title = "Hack on Phonegap";
var location = "The Basement";
var notes = "Hacking on open source projects late at night is the best!";
var success = function() { alert("woo hoo!"); };
var error = function(message) { alert("Doh!"); };
window.plugins.calendarPlugin.createEvent(title,location,notes,startDate,endDate, success, error);

That's it!


  • The only API that is implemented is createEvent. If you have a need for the other apis, feel free to implement them and send a pull request :)

  • This uses an undocumented API (that was finally documented in Jelly Bean). As such it may not work on pre 4.0 devices, but I've had very good luck so keep your fingers crossed.