New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add local notification api schedule and present #1616

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@jacobrosenthal
Contributor

jacobrosenthal commented Jun 13, 2015

Add local notifications to the push library.

  var PushNotificationIOS = React.PushNotificationIOS;
  PushNotificationIOS.requestPermissions();

  var notification = {
    "fireDate": Date.now() + 10000,
    "alertBody":"Whats up pumpkin"
  };

  PushNotificationIOS.scheduleLocalNotification(notification);
 //lock screen or move away from app

Apple has another api for pushing immediately instead of scheduling, like when your background delegate has been called with some new data (bluetooth, location, etc)

  var PushNotificationIOS = React.PushNotificationIOS;
  PushNotificationIOS.requestPermissions();

  var notification = {
    "alertBody":"Whats up pumpkin"
  };

  PushNotificationIOS.presentLocalNotification(notification);
 //lock screen or move away from app

Closed #843 looks related:

See https://developer.apple.com/library/ios/documentation/iPhone/Reference/UILocalNotification_Class/ for much more available in the api for eventual implementation.

@facebook-github-bot

This comment has been minimized.

Show comment
Hide comment
@facebook-github-bot

facebook-github-bot Jun 13, 2015

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

facebook-github-bot commented Jun 13, 2015

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@facebook-github-bot

This comment has been minimized.

Show comment
Hide comment
@facebook-github-bot

facebook-github-bot Jun 13, 2015

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

facebook-github-bot commented Jun 13, 2015

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@nicklockwood

This comment has been minimized.

Show comment
Hide comment
@nicklockwood
Contributor

nicklockwood commented Jun 16, 2015

@jacobrosenthal

This comment has been minimized.

Show comment
Hide comment
@jacobrosenthal

jacobrosenthal Jun 26, 2015

Contributor

There is a related missing piece from @slycoder which surfaces the localnotification 'event' to js when the application is started as a result of the localnotification, as is done for remote notifications
jacobrosenthal#1

Contributor

jacobrosenthal commented Jun 26, 2015

There is a related missing piece from @slycoder which surfaces the localnotification 'event' to js when the application is started as a result of the localnotification, as is done for remote notifications
jacobrosenthal#1

@randomer

This comment has been minimized.

Show comment
Hide comment
@randomer

randomer Jul 7, 2015

It would be awesome to see this in the next release! 👍

randomer commented Jul 7, 2015

It would be awesome to see this in the next release! 👍

@maxhoffmann

This comment has been minimized.

Show comment
Hide comment
@maxhoffmann

maxhoffmann Jul 8, 2015

Yes I need this feature as well. Would be great to have it available soon.

maxhoffmann commented Jul 8, 2015

Yes I need this feature as well. Would be great to have it available soon.

@sahrens sahrens closed this in a8cb47e Jul 14, 2015

dvcrn added a commit to dvcrn/react-native that referenced this pull request Jul 22, 2015

add local notification api schedule and present
Summary:
Add local notifications to the push library.
```
  var PushNotificationIOS = React.PushNotificationIOS;
  PushNotificationIOS.requestPermissions();

  var notification = {
    "fireDate": Date.now() + 10000,
    "alertBody":"Whats up pumpkin"
  };

  PushNotificationIOS.scheduleLocalNotification(notification);
 //lock screen or move away from app
```

Apple has another api for pushing immediately instead of scheduling, like when your background delegate has been called with some new data (bluetooth, location, etc)
```
  var PushNotificationIOS = React.PushNotificationIOS;
  PushNotificationIOS.requestPermissions();

  var notification = {
    "alertBody":"Whats up pumpkin"
  };

  PushNotificationIOS.presentLocalNotification(notification);
 //lock screen or move away from app
```

Closed facebook#843 looks related:

See https://developer.apple.com/library/ios/documentation/iPhone/Reference/UILocalNotification_Class/ for much more available in
Closes facebook#1616
Github Author: Jacob Rosenthal <jakerosenthal@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment