How to use the react-native-send-intent.addCalendarEvent function in react-native-send-intent

To help you get started, we’ve selected a few react-native-send-intent examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github asommer70 / thehoick-habit-app / src / habits.js View on Github external
this.setState({habits: habits}, () => {
          this.props.events.emit('new-habit', this.props.habits);

          // Get the endDate using Moment based on Moment object for the startDate and adding 30 minutes.
          var startDate = moment().format('YYYY-MM-DD') + ' ' + habits[habitIdx].reminder;
          var startMoment = moment(startDate);
          var endMoment = startMoment.add(30, 'm');
          var endDate = endMoment.format('YYYY-MM-DD hh:mm');

          // Create the Calendar Intent.
          SendIntentAndroid.addCalendarEvent({
            title: habits[habitIdx].name,
            description: 'Reminder from The Hoick Habit App for Habit: ' + habits[habitIdx].name,
            startDate: startDate,
            endDate: endDate,
            recurrence: 'daily'
          });
        });
      });
github mikelambert / dancedeets-monorepo / mobile / js / api / calendar.js View on Github external
function addAndroid(event: Event) {
  const { start, end } = getStartEndTime(event);

  // Sometimes get the following errror:
  // Fatal Exception: android.content.ActivityNotFoundException
  // No Activity found to handle Intent { act=android.intent.action.INSERT dat=content://com.android.calendar/events flg=0x10000000 (has extras) }
  // Filed as https://github.com/lucasferreira/react-native-send-intent/issues/45
  SendIntentAndroid.addCalendarEvent({
    title: event.name,
    description: getDescription(event),
    startDate: androidDate(start),
    endDate: androidDate(end),
    location: event.venue.fullAddress(),
    recurrence: '',
  });
  return true;
}

react-native-send-intent

React Native Android module to use Android's Intent actions for send sms, text to shareable apps, open custom apps, make phone calls and etc

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis