Pinned topicPush Notification for different users

‏2012-11-20T05:20:31Z
|Tags:

Answered question
This question has been answered.

Unanswered question
This question has not been answered yet.

Hi,
I have implemented push notification as per the sample provided in WL's tutorial.But it is sending Notification for only one user ID.I want to send push notification for multiple users in multiple devices.How it will be accomplish?

1. You could "broadcast" the notifications - go over the list of all subscribed users and send the notification to all of them
2. You could implement push without a username required
Now you are saying "So the ability to broadcast is not currently available."

Re: Push Notification for different users

1. You could "broadcast" the notifications - go over the list of all subscribed users and send the notification to all of them
2. You could implement push without a username required
Now you are saying "So the ability to broadcast is not currently available."

Worklight server must know user's identity in order to be able to send push notifications. In case you did not define any user authentication in your application, Worklight server will use an "anonymous" user identity - a persistent cookie created on first application launch. This is considered an unauthenticated access.
In case this is the model you want to use you need to declare an EventSource in your adapter which does not require authentication (do not specify securityTest for it) and then use WL.Server.notifyAll(eventSource, options) API.
This will send notification to users that are subscribed to a specified event source.