Reputation: 73
I am developing an Android app, which deals with allocating orders to multiple suppliers. Each supplier will have the same Android app installed. Every day, the in charge of the suppliers will open the app, pick up the suppliers to assign from the recyclerview and enter a customised message on the days' supply in an editText.
The message should be delivered in form of push notification to other suppliers he has selected from the recyclerview. So, in this case I cannot use Firebase console to send notifications. I initially thought of using Twilio to do this. But my client wanted to keep this as last option. They want me to try Push notifications.
I am researching, but every one is illustrating on how the notification can be sent through Firebase console. I also heard that GCM is obsolete now.
Please can anyone give me some pointers on how this can be done? Please note that I am a beginner in Android.
Upvotes: 2
Views: 1064
Reputation: 1568
I think you can use firebase cloud messaging to achieve this. See FCM documentation.
You can send a push notification through firebase by using firebase HTTP protocol instead of the firebase console. In this way, you can programmatically send a push notification by making a REST call. There are 2 firebase HTTP protocols that you may use to achieve this:
Hence, in your app, once the in charge of suppliers assigns the duties, you can call the firebase APIs to send out push notifications to all the assigned suppliers.
Upvotes: 1