mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
iOS: Testing notification
This commit is contained in:
parent
c053146885
commit
3612529e52
@ -1,5 +1,5 @@
|
||||
const React = require('react'); const Component = React.Component;
|
||||
const { Keyboard, NativeModules } = require('react-native');
|
||||
const { Keyboard, NativeModules, PushNotificationIOS } = require('react-native');
|
||||
const { connect, Provider } = require('react-redux');
|
||||
const { BackButtonService } = require('lib/services/back-button.js');
|
||||
const { createStore, applyMiddleware } = require('redux');
|
||||
@ -366,14 +366,25 @@ async function initialize(dispatch, backButtonHandler) {
|
||||
}
|
||||
|
||||
|
||||
reg.logger().info('Scheduling iOS notification');
|
||||
|
||||
|
||||
PushNotification.localNotificationSchedule({
|
||||
message: "My Notification Message", // (required)
|
||||
date: new Date(Date.now() + (10 * 1000)) // in 60 secs
|
||||
PushNotificationIOS.scheduleLocalNotification({
|
||||
alertTitle: "From Joplin",
|
||||
alertBody : "Testing notification on iOS",
|
||||
fireDate: new Date(Date.now() + (10 * 1000)),
|
||||
});
|
||||
|
||||
|
||||
|
||||
// const r = PushNotification.localNotificationSchedule({
|
||||
// id: '222456',
|
||||
// message: "My Notification Message", // (required)
|
||||
// date: new Date(Date.now() + (10 * 1000)) // in 60 secs
|
||||
// });
|
||||
|
||||
//PushNotification.cancelLocalNotifications({ id: '222456' });
|
||||
|
||||
|
||||
reg.logger().info('Application initialized');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user