How to send notification to android mobile app using Firebase and php & mysql.
Android Push Notifications using Firebase Cloud Messaging (FCM) and PHP & MySQL
send notification to android mobile app using Firebase and php & mysql
How to send notification to android mobile app using Firebase and php & mysql?
Author: Shashi Dhar Kumar
Author URI: https://www.shashidharkumar.in
Plugin URL: https://www.shashidharkumar.com
- Copy the below code to create your table in database
-- Table structure for table registeruser
--
CREATE TABLE registeruser
(
id
int(11) NOT NULL,
mobile
int(11) NOT NULL,
mobiletoken
int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
-- Indexes for table registeruser
--
ALTER TABLE registeruser
ADD PRIMARY KEY (id
);
-- AUTO_INCREMENT for table registeruser
--
ALTER TABLE registeruser
MODIFY id
int(11) NOT NULL AUTO_INCREMENT;
-
Register few mobile devices using your mobile app
-
Copy the php code or download as it is
-
Change the required parameters according to your details
4.1. Update Database configuration details
4.1. Firebase Cloud Messaging api key
4.1. How to get Firebase Cloud Messaging API Key - Firebase Cloud Messaging api key - For this login to your firebase console and see the project setting icon just right after Project Overview and Click on Cloud Messagging tab and copy value of "Legacy server key"