Comments (9)
Hi @blackPeanut, could you give an example of your code and the error if there is one? Thanks
from react-native-calendar-reminders.
Yep, sure. Here you go.
P.S. By the way, 'saveReminder event' didn't even dispatch if i uncomment recurrence;
import React, { Component, } from 'react';
import {
View,
TouchableHighlight,
Text,
NativeAppEventEmitter,
StyleSheet,
} from 'react-native';
import RNCalendarReminders from 'react-native-calendar-reminders';
export default class Rem extends Component {
constructor(props) {
super(props);
};//constructor
handleAddReminder() {
RNCalendarReminders.saveReminder('title', {
location: 'location',
notes: 'notes',
startDate: '2017-10-01T09:45:00.000UTC',
alarms: [{
date: -1 // or absolute date
}],
//recurrence: 'daily'
});
}
componentWillMount() {
this.eventEmitter = NativeAppEventEmitter.addListener('remindersChanged', reminders => {
console.log('REMINDERS OBJECT HAS BEEN CHANGED', reminders);
});
RNCalendarReminders.authorizeEventStore(({status}) => {
console.log(status);
status === 'denied' ? alert('Enable notifications') : null;
});
}//cwm
componentWillUnmount () {
this.eventEmitter.remove();
}
render() {
return (
<View style={styles.container}>
<TouchableHighlight style={styles.btn} onPress={this.handleAddReminder}>
<Text>Reminder</Text>
</TouchableHighlight>
</View>
);//return
};//render
};//class
const styles = StyleSheet.create({
container: {
paddingTop: 20,
paddingBottom: 40,
},
btn: {
width: 60,
height: 20,
backgroundColor: 'tomato',
}
});
from react-native-calendar-reminders.
Thanks. When setting a 'dueDate' and 'recurrence' it should put it in the "scheduled" reminders. Although, setting the alarm date to a relative time versus absolute time have different results. Neither seem to be throwing triggering the notification and i'm not exactly sure why.
from react-native-calendar-reminders.
@wmcmahan I've tried to set alarm time as absolute and relative. Have you succeed to run my example and put reminders in scheduled with any possible options?
P.S. Are you planning to fix this in nearest future? Or better to look through for other solution for now?
Thanks
from react-native-calendar-reminders.
Reminders should be marked as scheduled if they have a dueDate. ex:
RNCalendarReminders.saveReminder('title', {
location: 'location',
notes: 'notes',
startDate: new Date('2017-10-01T09:45:00.000UTC'),
dueDate: new Date('2017-10-01T09:46:00.000UTC'),
alarms: [{
date: new Date('2017-10-01T09:44:00.000UTC'),
}],
recurrence: 'daily'
});
I'm looking into the the notifications and why they might not get triggered when programmaticaly creating and alarm. Not sure if it is an ios issue or not. I will try to find a fix soon if its related to this code.
from react-native-calendar-reminders.
Yep, now I can add a notification to scheduled (seems it should be due date) but as you have mentioned (also recurrence stared to work) it doesn't trigger actually the alarm.
Thanks, no other solutions, except yours 😢
from react-native-calendar-reminders.
when I use that package for creating alarm, it works for creating new events on the calendar on the device, but Alarm does not work.
for exam
- Set Alarm at 1:50 PM
- Waited for this time AR no notifications or signals
here is my codebase
from react-native-calendar-reminders.
hey,
please help me in reminder app in react native ios ,
from react-native-calendar-reminders.
from react-native-calendar-reminders.
Related Issues (20)
- Module RCTNativeAppEventEmitter is not a registered callable module HOT 5
- is there any plan to implement calendar events accessing functionality HOT 1
- Errors when trying to fechAllReminders HOT 2
- Support to check if an item has been 'marked done' HOT 4
- Request for simpler function to update existing reminder HOT 2
- Recurring reminder marked as done changes time of next notification. HOT 9
- Fatal Error on saving reminder with custom id HOT 3
- how can I fix the"RCTBridgeModule.h not found"? HOT 1
- Should change the npm command to include --save HOT 1
- Module breaking android release build HOT 3
- Module does not work in release build. HOT 7
- Can't create customized recurrence reminders HOT 4
- Error installing library HOT 1
- Lots of warnings in iOS 10 Xcode project when building HOT 1
- No calendar has been set HOT 1
- Not Working for android HOT 1
- is it possible to bind this library to agenda component in react-native-calendars library ?
- undefined is not a function (near '..._reactNativeCalendarReminders.default.saveReminder...') HOT 1
- Manual Linking HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-calendar-reminders.