I\'m new to push notifications using FCM from php to Android devices. From android side I have generated FCM reg_id & send it over php script & store into mysql data
If you were to send notification via terminal the data part of the curl command would look like this:
{
"registration_ids": ["device_token_1", "device_token_2"],
"notification": {
"body": "Hello",
"title": "Hello",
"vibrate": 1,
"sound": 1
}
}
PHP code:
$body = array(
'registration_ids' => array("device_token_1", "device_token_2"),
'notification' => array('body' => 'Hello', 'title' => 'Hello', 'vibrate' => 1, 'sound' => 1)
);