I am working on android GCM for my application to send push notification to users. And I am following this tutorial
But in This tutorial its shown that we can send push notification to individual device. But I want to send push notification to all the users at once. So how can I implement this technique.
You can also take a "backend as a service" where the push module is integrated. So you can notify all participants from the backend. I have some time used "apiomat" and was satisfied
and if you take a look you can see all users are registering to a topic. by the topics you can send to all users with a topic.
for sending to topic you have to use this page https://developers.google.com/cloud-messaging/topic-messaging
and for testing the push notifications, you can use "advanced rest client" in chrome extensions.
I have already faced the same problem and solved it. To send push notification to all the users at once, you have to do all the things listed on the tutorial you've mentioned. But you have to change two files:
index.php
andsend_message.php
In
index.php
:a. Replace the JavaScript code with the following:
b. Replace the code inside body tag with the following (skipping first five lines):
In
send_message.php
:Replace the line:
with
Yes you can Send With GCM as it allows Multicast Messagin service also.
with Using Below Formate:
Here value of key registration_ids should be as follow :
Hope it Will help you.