UNPKG

2.98 kBMarkdownView Raw
1# LoopBack Push Notification Component
2
3![StrongLoop Labs](http://docs.strongloop.com/download/thumbnails/5310165/StrongLoop%20Labs%20Logo%20Cropped.png "StrongLoop Labs")
4
5> StrongLoop Labs projects provide early access to advanced or experimental functionality. In general, these projects may lack usability, completeness, documentation, and robustness, and may be outdated.
6However, StrongLoop supports these projects: Paying customers can open issues using the StrongLoop customer support system (Zendesk), and community users can report bugs on GitHub.
7
8This module provides a set of LoopBack models to enable mobile device push notifications.
9
10Please see the full documentation: [Push notifications](http://docs.strongloop.com/display/LB/Push+notifications).
11
12NOTE: The loopback-component-push module supersedes [loopback-push-notification](https://www.npmjs.org/package/loopback-push-notification). Please update your package.json accordingly.
13
14## Architecture
15
16![push-notification.png](push-notification.png)
17
18## Key Components
19
20* Device model and APIs to manage devices with applications and users
21* Application model to provide push settings for device types such as ios and
22android
23* Notification model to capture notification messages and persist scheduled
24notifications
25* Optional Job to take scheduled notification requests
26* Push connector that interact with device registration records and push
27providers such as APNS, GCM, and MPNS
28* Push model to provide high level APIs for device-independent push notifications
29
30## Samples
31
32### Node.js server
33
34This module includes an [example LoopBack server application](https://github.com/strongloop/loopback-component-push/tree/master/example/server-2.0).
35
36To run it, use these commands:
37
38 $ cd example/server
39 $ npm install
40 $ bower install
41 $ node app
42
43Open your browser to [http://127.0.0.1:3010](http://127.0.0.1:3010).
44
45By default, the application uses an in-memory store for the application/installation data.
46To change to a MongoDB instance, set the MONGODB environment variable to the MongoDB URL. For example,
47
48 MONGODB=mongodb://localhost/demo node app
49
50### iOS client
51
52The [iOS example app](https://github.com/strongloop/loopback-component-push/tree/master/example/ios) uses the LoopBack iOS SDK to enable
53and handle push notifications.
54
55### Android client
56
57The [Android example app](https://github.com/strongloop/loopback-component-push/tree/master/example/android) uses the LoopBack Android SDK to enable
58and handle push notifications.
59
60## References
61
62- https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html
63- http://developer.android.com/google/gcm/index.html
64- http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202945(v=vs.105).aspx
65- https://github.com/argon/node-apn
66- https://github.com/logicalparadox/apnagent-ios
67- https://blog.engineyard.com/2013/developing-ios-push-notifications-nodejs
68