I am writing an android application in which i need to send a notification to a group of users.
I have two group of users in the database. If a user press a button "Notify Group 1" in the android app , i need to send the notification to all the group 1 users. How i implement this logic? I think the same logic is using in the group chat .
Can you provide me the sample code for android and server side?
Thanks.. Zacharia
Using Android Cloud to Device Messaging is the best approach, as you can easily integrate it with MySQL and PhP, having the necessary tools to send message over internet.
You can group users according to your need:
Source - AndroidHive
Here you have a typical example with a Java class that send message over internet with Google cloud:
To wrap it up, then you can integrate you query using MySQL with PhP to achieve what you want. Here you have the server side with the PhP example:
Here you find some additional examples that might come in hand, including logic of the system:
Taking from here you can get your App with the features you have in mind.