Skip to content

Commit

Permalink
Merge pull request #1 from rugoncalves/master
Browse files Browse the repository at this point in the history
Calendar Plugin - merge master to upstream 5.1.3
  • Loading branch information
pmaroco authored Nov 30, 2018
2 parents cc94d6e + ade3f84 commit 01b32ce
Show file tree
Hide file tree
Showing 17 changed files with 1,561 additions and 723 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
demo/platforms
demo/plugins
*.ipr
*.iml
.idea/
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
demo
.idea
demo/
test/
48 changes: 29 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ cordova plugin add cordova-plugin-calendar --variable CALENDAR_USAGE_DESCRIPTION
* Supported methods on Android 4: `find`, `create` (silent and interactive), `delete`, ..
* Supported methods on Android 2 and 3: `create` interactive only: the user is presented a prefilled Calendar event. Pressing the hardware back button will give control back to your app.

### Windows 10 Mobile
* Supported methods: `createEvent`, `createEventWithOptions`, `createEventInteractively`, `createEventInteractivelyWithOptions` only interactively

## 2. Installation

### Automatically
Expand Down Expand Up @@ -130,24 +133,28 @@ Also, make sure you're building with Gradle by adding this to your `config.xml`

The table gives an overview of basic operation compatibility:

Operation | Comment | iOS | Android
----------------------------------- | ----------- | --- | -------
createCalendar | | yes | yes
deleteCalendar | | yes | yes
createEvent | silent | yes | yes (on Android < 4 dialog is shown)
createEventWithOptions | silent | yes | yes (on Android < 4 dialog is shown)
createEventInteractively | interactive | yes | yes
createEventInteractivelyWithOptions | interactive | yes | yes
findEvent | | yes | yes
findEventWithOptions | | yes | yes
listEventsInRange | | | yes
listCalendars | | yes | yes
findAllEventsInNamedCalendars | | yes |
modifyEvent | | yes |
modifyEventWithOptions | | yes |
deleteEvent | | yes | yes
deleteEventFromNamedCalendar | | yes |
openCalendar | | yes | yes
Operation | Comment | iOS | Android | Windows |
----------------------------------- | ----------- | --- | ------- | ------- |
createCalendar | | yes | yes | |
deleteCalendar | | yes | yes | |
createEvent | silent | yes | yes * | yes ** |
createEventWithOptions | silent | yes | yes * | yes ** |
createEventInteractively | interactive | yes | yes | yes ** |
createEventInteractivelyWithOptions | interactive | yes | yes | yes ** |
findEvent | | yes | yes | |
findEventWithOptions | | yes | yes | |
listEventsInRange | | | yes | |
listCalendars | | yes | yes | |
findAllEventsInNamedCalendars | | yes | | |
modifyEvent | | yes | | |
modifyEventWithOptions | | yes | | |
deleteEvent | | yes | yes | |
deleteEventFromNamedCalendar | | yes | | |
deleteEventById | | yes | yes | |
openCalendar | | yes | yes | |

* \* on Android < 4 dialog is shown
* \** only interactively on windows mobile

Basic operations, you'll want to copy-paste this for testing purposes:
```js
Expand Down Expand Up @@ -235,14 +242,17 @@ Basic operations, you'll want to copy-paste this for testing purposes:
newOptions.firstReminderMinutes = 120;
window.plugins.calendar.modifyEventWithOptions(title,eventLocation,notes,startDate,endDate,newTitle,eventLocation,notes,startDate,endDate,filterOptions,newOptions,success,error);

// delete an event (you can pass nulls for irrelevant parameters, note that on Android `notes` is ignored). The dates are mandatory and represent a date range to delete events in.
// delete an event (you can pass nulls for irrelevant parameters). The dates are mandatory and represent a date range to delete events in.
// note that on iOS there is a bug where the timespan must not be larger than 4 years, see issue 102 for details.. call this method multiple times if need be
// since 4.3.0 you can match events starting with a prefix title, so if your event title is 'My app - cool event' then 'My app -' will match.
window.plugins.calendar.deleteEvent(newTitle,eventLocation,notes,startDate,endDate,success,error);

// delete an event, as above, but for a specific calendar (iOS only)
window.plugins.calendar.deleteEventFromNamedCalendar(newTitle,eventLocation,notes,startDate,endDate,calendarName,success,error);

// delete an event by id. If the event has recurring instances, all will be deleted unless `fromDate` is specified, which will delete from that date onward. (iOS and android only)
window.plugins.calendar.deleteEventById(id,fromDate,success,error);

// open the calendar app (added in 4.2.8):
// - open it at 'today'
window.plugins.calendar.openCalendar();
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-calendar",
"version": "4.5.5",
"version": "5.1.3",
"description": "This plugin allows you to manipulate the native calendar.",
"cordova": {
"id": "cordova-plugin-calendar",
Expand All @@ -21,12 +21,13 @@
"cordova-ios",
"cordova-android"
],
"engines": [
{
"name": "cordova",
"version": ">=3.0.0"
"engines": {
"cordovaDependencies": {
"3.0.0": {
"cordova-android": ">=6.3.0"
}
}
],
},
"author": "Eddy Verbruggen <eddyverbruggen@gmail.com> (https://github.com/EddyVerbruggen)",
"license": "MIT",
"bugs": {
Expand Down
16 changes: 13 additions & 3 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-calendar"
version="4.5.5">
version="5.1.3">

<name>Calendar</name>

Expand All @@ -22,7 +22,7 @@
<issue>https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin/issues</issue>

<engines>
<engine name="cordova" version=">=3.0.0"/>
<engine name="cordova-android" version=">=6.3.0" />
</engines>

<js-module src="www/Calendar.js" name="Calendar">
Expand All @@ -47,6 +47,7 @@
<string>nl</string>
<string>fr</string>
<string>it</string>
<string>pt-BR</string>
</array>
</config-file>
<!-- Usage description of the Calendar for iOS 6+, mandatory since iOS 10 -->
Expand Down Expand Up @@ -78,6 +79,15 @@
target-dir="src/nl/xservices/plugins/accessor"/>
<source-file src="src/android/nl/xservices/plugins/accessor/LegacyCalendarAccessor.java"
target-dir="src/nl/xservices/plugins/accessor"/>
<dependency id="cordova-plugin-compat" version="^1.0.0" />
</platform>

<!-- windows -->
<platform name="windows">
<js-module src="src/windows/appointment.js" name="appointment">
<merges target="" />
</js-module>
<config-file target="config.xml" parent="/*">
<feature name="Calendar" value="Calendar" />
</config-file>
</platform>
</plugin>
Loading

0 comments on commit 01b32ce

Please sign in to comment.