Simple PHP script to Send Push notification to Android Devices via Firebase
This script is used in my Android application and I extracted it from that.
- Download ZIP file or clone it to your devices/servers.
- Create a firebase project and connect it to application with your own google-services.json file.
- Go to config.php and change your information following:
- Database information
- Firebase Authentication Key. You can get it here:
https://console.firebase.google.com/project/{project_name}/settings/cloudmessaging
- Execute createdb.php to create your database.
- Add to your Android source code like this example.java.
- Open your app and refresh the MySQL table if there is any change.
- Via form.html
- Via GET:
push.php?title='Your_Title_here'&message='Your_message_here'