lucasferreira / react-native-send-intent

React Native Android module to use Android's Intent actions for send text to shareable apps or make phone calls or opening third party apps
418 stars 159 forks source link

Adding Event in device's calender #107

Closed ayushijain649 closed 4 years ago

ayushijain649 commented 4 years ago

I have to set events in calender. I did installation and linking. and also manually set android folder files(setting/gradle, app/build.gradle and myApplication.java). now in my compponent i wrote:

var SendIntentAndroid = require('react-native-send-intent'); SendIntentAndroid.addCalendarEvent({ title: 'Go To The Park', description: "It's fun to play at the park.", startDate: '2016-01-25 10:00', endDate: '2016-01-25 11:00', recurrence: 'weekly', location: 'The Park' }); this time i got the error "TypeError: TypeError: TypeError: undefined is not a function (near '...RNSendIntentAndroid.addCalendarEvent...')"

Expected behavior is "It should create an event for these dates(start and end date) in my device's calender" . but I am facing the error shown above. I am running my app in my android with "expo start" how can i solve it. Please help me out.

lucasferreira commented 4 years ago

Hi @ayushijain649

What its your React Native version?

ayushijain649 commented 4 years ago

Hi @ayushijain649 What its your React Native version?

hi react-native: 0.59.8

ayushijain649 commented 4 years ago

Issue solved . i was using expo in my project. with expo eject i removed it and it solved my all errors for calender. And npm is awesome. I used mail option too in my app that also worked fine. Thank you so much :)