Push Notification in Android using Firebase (FCM) and PHP
Creating PHP Project 1. Start WAMP/XAMPP server and navigate to www or htdocs folder and create a folder named firebase inside it. Inside this folder, create a subfolder called notifications 2. Now create a file named notification.php inside notifications folder. This will have Notification class which will help in constructing the notification data payload. notification.php PHP 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 <?php class Notification { private $title ; private $message ; private $image_url ; private $action ; private $action_destination ; private $data ; function __construct ( ) { ...