WebAPI/SimplePush: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 128: Line 128:
where 'http://mypushserver.com/notification/forUserBob' is the Endpoint sent by the App.
where 'http://mypushserver.com/notification/forUserBob' is the Endpoint sent by the App.


'''IMPORTANT NOTE:''' It is very likely that users will install their apps on multiple devices. In this case, each installation of the app has a different Endpoint. You should design your server side storage so that each piece of information may have multiple Endpoints to be notified when it changes.
'''IMPORTANT NOTE:''' It is very likely that users will install their apps on multiple devices. In this case, each installation of the app has a different Endpoint. You should design your server side storage so that each piece of information may have multiple Endpoints to be notified when it changes. For example, Bob may have MyAmazingEmailApp installed on his Firefox OS phone, he may run it on Firefox for Android and also in his car entertainment system (in some future). In that case, on a new email to Bob, the AppServer should PUT to 3 different endpoints.
 
  curl -X PUT --data 'version=5' 'http://mypushserver.com/notificaton/forUserBobFirefoxOSDevice'
  curl -X PUT --data 'version=5' 'http://mypushserver.com/notificaton/forUserBobAndroidFirefox'
  curl -X PUT --data 'version=5' 'http://mypushserver.com/notificaton/forUserBobBMWBoombox'


== DOM Interface ==
== DOM Interface ==
Confirmed users
93

edits

Navigation menu