react-native-acoustic-mobile-push-calendar.md

Acoustic Mobile Push Calendar Action Plugin

Requirements

  • Acoustic Mobile Push Plugin (react-native-acoustic-mobile-push)

Description

This action plugin provides a way for push message actions to add events to the user's calendar.

Installation

npm install --save <sdk folder>/plugins/react-native-acoustic-mobile-push-calendar

Post Installation Steps

Link the plugin with

react-native link react-native-acoustic-mobile-push-calendar

Please replace the placeholder calendar usage descriptions in info.plist in the NSCalendarsUsageDescription key. This value helps inform your users how you're going to respectfully use the access.

Payloads

The following action payloads can be sent to the device to trigger this plugin.

iOS

{
  "type": "calendar",
  "title": "Title of event",
  "description": "Description of event",
  "timeZone": "Short timezone code like EST, GMT, etc",
  "startDate": "ISO 8601 Timestamp, eg yyyy-MM-ddTHH:mm:ssZ",
  "endDate": "ISO 8601 Timestamp, eg yyyy-MM-ddTHH:mm:ssZ",
  "interactive": true 
}

When interactive=true a system view controller is presented to add event, when interactive=false the event is added without user interaction.

Android

{
  "title": "Title of event",
  "description": "Description of event",
  "starts": {
    "date": "yyyy-MM-dd",
    "time": "HH:mm",
    "timezone": "short timezone code like EST, GMT, etc"
  },
  "ends": {
    "date": "yyyy-MM-dd",
    "time": "HH:mm",
    "timezone": "short timezone code like EST, GMT, etc"
  }
}