Message Boards

Send Notification to All registered devices.

reda zejli, modified 7 Years ago.

Send Notification to All registered devices.

New Member Posts: 10 Join Date: 9/1/16 Recent Posts
Hello everyone,

I am building a bookstore portlet wich communicate with an android app. I've all set app ,I got notifications from test tab.
Now I am trying to send notification to all users when a book is added.
So for that from the docs All I need to use is: PushNotificationsDeviceLocalServiceUtil.sendPushNotification(ids,jsonObject);

But in fact I don't know how to get the Ids.
So how can I get the tokens.Or is there's any way or function to send to all devices.

Thank you,
thumbnail
Javier Gamarra, modified 7 Years ago.

RE: Send Notification to All registered devices.

Expert Posts: 348 Join Date: 2/12/15 Recent Posts
You can get the ids registering devices with the portal through the Push Mobile SDKs or with Liferay Screens.

There is an example here.