You're welcome! 😊 I'm glad you found the video helpful. If you have any questions or need further guidance, feel free to ask. Your feedback means a lot-what topic would you like to see next?
Safari browser does not natively support Firebase Cloud Messaging (FCM) for push notifications. FCM is primarily designed for Android, iOS, and web browsers like Chrome and Firefox. For Safari push notifications, you can use Apple Push Notification Service (APNs). Let me know if you’d like more details!
Also, send the sound file URL from the backend to the Firebase notification array in a new parameter named "sound", and include the URL in this parameter. Then, retrieve the sound URL from the Firebase event and play the sound. Ensure the file format is supported by iOS, such as .caf, .aiff, or .wav.
Thanks 👍🏻
You're welcome! 😊 I'm glad you found the video helpful. If you have any questions or need further guidance, feel free to ask. Your feedback means a lot-what topic would you like to see next?
Hi brother, i didn't find the pushnotification.php in the traits folder
hi brother this is Traits
How to send notification with multiple tokens or send notification with topic in laravel , please explain
public function sendfirebaseNotification(Request $request)
{
$tokens = [
"ecfkA1kGQiSRWR-dat4R9a:APA91bFnTAMOi5fFLrb3sHJ9wNnYx3ockp0Syv9EvFSgEUjeKxhOu60DkA7gN5ut2rl5Y7ghkDDLBWKRY8JR3Txr5CRnJ_R9jIzeleYqSBPGWq-u8LMVx0E",
"other_token_here",
"another_token_here"
]; // Add multiple tokens here
$notification = [
'title' => "Testing",
'body' => "body",
'icon' => "icon name",
'sound' => 'default',
'screen_type' => "Testing",
];
$extraNotification = [
"message" => $notification,
"moredata" => $request->moredata
];
$fcmNotification = [
'registration_ids' => $tokens, // Array of tokens
'notification' => $notification,
'data' => $extraNotification,
];
$response = $this->sendNotification($fcmNotification);
return response()->json($response, 200);
}
Add multiple ids tokens. For sending notifications to multiple devices this is code you can rest it.
Safari browser Support FCM Generate Token and Push Notifications ?
Safari browser does not natively support Firebase Cloud Messaging (FCM) for push notifications. FCM is primarily designed for Android, iOS, and web browsers like Chrome and Firefox. For Safari push notifications, you can use Apple Push Notification Service (APNs). Let me know if you’d like more details!
Please see this video for APN.
th-cam.com/video/0QOGfqBpy4I/w-d-xo.html
How to change iOS push notification sound programmatically ?
Also, send the sound file URL from the backend to the Firebase notification array in a new parameter named "sound", and include the URL in this parameter. Then, retrieve the sound URL from the Firebase event and play the sound. Ensure the file format is supported by iOS, such as .caf, .aiff, or .wav.
@@RiyastCollege is it possible through firebase console?
@@abdullahshahid6637 Yes this possible using Firebase console.