Reputation: 11
I have written IBM Adapter for push notification.I able to fetch device Id from device using 'WL.Device.getID'.I want to send push notification on the device but there is no way to subscribe.and did not find a way to subscribe push notification Event source in java adapter as mentioned in demo javaScript adapter. When I called sendMessage() method through pushApi , I got exception that PushApplication was not found.
Also to handle the challange , we use WorklightProtocolAuthenticator .
Please help how i can send push notification using java based push adapter.
Below is my adapter :-
WLServerAPI api = WLServerAPIProvider.getWLServerAPI();
PushAPI pushApi = api.getPushAPI();
INotification noti = pushApi.buildNotification();
noti.getTarget().setDeviceIds("a5be4b35-b278-3014-b933-ce99a8l87819");
noti.getMessage().setAlert("text to be send on device");
pushApi.sendMessage(noti, "ApplicationId");
And how can i get this ApplicationId.
Upvotes: 1
Views: 45
Reputation: 44526
Please help how i can send push notification using java based push adapter.
You do not find what you are looking for because AFAIK it does not exist. The APIs are available only in JavaScript.
Upvotes: 0