Cant get notification

Solved!
Posted in General by Arthur Ra Mon Mar 07 2016 18:53:08 GMT+0000 (UTC)·1·Viewed 2,178 times

Hello, I have a problem but documentation wont help here, since I did exactly everything I should according to documentation. So I want to send notification to all registered devices. I register them successfully, I can see them on dashboard and their's tokens for GCM. All GCM mechanics are working for sure because I can send notifications manually using cURL command. Also Test GCM on buddy dashboard works (but I cant use it like that if I want to send notification to 100 devices). When I click on device details, there is UI to push notifications, but it doesnt work. When I try to use Buddy.<JsonObject>post("/notifications"... in my android code, it also doesnt work even tho result is a success. So my question is, why its not working? what am I doing wrong? Is there an option to send notification to all registered devices from buddy dashboard? (if yes I cant find it, and it could be linked in documentation).
Bradley Serbus
Mar 8, 2016

Hi Arthur,

In Buddy, you send push notifications to users on devices, vs. devices themselves. You can iterate through all users (https://docs.buddy.com/docs/search-users) and send using the recipients property of a POST '/notifications' (https://docs.buddy.com/docs/send-push-notification). Or, you can create a user list (https://docs.buddy.com/docs/create-userlist), add users to that list when they are created, and set the recipients property of the POST '/notifications' to the id of that user list.

If you're still having problems, contact me at [email protected], and I'll follow up with you there.

Thanks,
Brad


Bradley Serbus marked this as solved
Markdown is allowed