• 1 reply
  • Latest Post - ‏2012-11-29T09:10:40Z by AntonAleksandrov
2327 Posts

Pinned topic Doubts regarding Push notification in WL

‏2012-11-29T07:21:27Z |
I ve go through the push notification sample in wl modules. i ve a doubt whether its possible to send Application id and Registration ID of user from

Worklight server ---> Rest Service ---> GCM server --> deliver messages to Android device. ?


by default Worklight server will handles the pushnotification and sends to GCM server

Is this scenario is possible.
  • AntonAleksandrov
    55 Posts

    Re: Doubts regarding Push notification in WL

    Push notification architecture is a bit complex, with Worklight server in the middle.
    First you need to declare an event source in the adapter. Once you have declared an event source, register for this event source from client applications. Once you do - you're covered from a client side perspective.

    Now you need to send push notifications.
    Worklight server needs to know notification data like userId and notification text. Those details must be provided by some kind of backend. Worklight server supports two types of notification data retrieval - backend polling and using an adapter procedure. This means that Worklight server can either poll notifications data from your backend with some predefined interval or wait for your backend to invoke an adapter procedure providing notification data.

    In the sample adapter procedure is used for simplicity.
    Once Worklight server receives notification data it can process it and communicate with Google/Apple server to send notification.
    So, the architecture is more like

    Client <-> Worklight Server <-> Backend

    GCM/APNS server

    deliver message to a device