-
-
Notifications
You must be signed in to change notification settings - Fork 451
Description
Describe the feature you would like to see
First of all sorry for the long sheet that you will see bellow, I just need a place to discuss some of the concerns I have.
I want to send push notifications from my php backend to my hybrid ionic mobile applications (I use a REST API so that the mobile and web app can communicate). I want to be able to use topics and all the features from my web server environment.
I did a lot of research on using the fcm cloud messaging from the backend of my php yii2 application and I could not manage to find an original package to do so. From what I saw in the docs, there are official libraries only for node, java, python, go and c#. That's how I ended up in this plugin.
My concern is that just by using api requests I can just access this endpoind => https://fcm.googleapis.com/v1/projects/project-id/messages:send, which just sends a notification to a single device or topic.
I want to be able to do topic management in the server.
From what I saw this plugin allows that. But does it use endpoints internally that are deprecated at the moment (original migration guide)? Or maybe I am missing something???
For example:
use Kreait\Firebase\Messaging\CloudMessage;
$message = CloudMessage::new(); // Any instance of Kreait\Messaging\Message
$deviceTokens = ['...', '...' /* ... */];
/** @var Kreait\Firebase\Messaging\MulticastSendReport $sendReport **/
$sendReport = $messaging->sendMulticast($message, $deviceTokens);
Does this example from the doc use any deprecated api endpoint under the hood?
Thanks for your time and excuse me for the long text, I just could not exactly understand what is deprecated and what isn't in the FCM Messaging ecosystem. I think Google kinda mixes everything up and the original documentation is not very clear.