I am working on an Android project. In that I need to send some notifications on background on the basis of condition on MySQL database... How can I use PHP to send notification to certain users after checking the condition.
Asked
Active
Viewed 794 times
-1
-
2Does this answer your question? [Push Notifications in Android Platform](https://stackoverflow.com/questions/1378671/push-notifications-in-android-platform) – Reza Ahmadi Mar 14 '20 at 17:33
1 Answers
0
Follow below steps to achieve this,
- Get the device token using Firebase SDK and store it in your mysql database against user (https://firebase.google.com/docs/cloud-messaging/android/client)
- Select device tokens matching your criteria (SQL Query)
- Send the push message to selected device using firebase rest api (https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages/send, How can I send a Firebase Cloud Messaging notification without use the Firebase Console?)
![](../../users/profiles/2177996.webp)
dryize
- 200
- 1
- 8