Firebase cloud messaging with database triggers [duplicate] - android

This question already has answers here:
How to send one to one message using Firebase Messaging
(5 answers)
Closed 2 years ago.
Hi there fellow programmers. I'm developing a mobile app using firebase and I want a push notification to be sent to all users when a particular value in realtime database.
After some searching I figured I probably have to use cloud functions and database triggers. So since I have no knowledge of node.js I need someone to help me through this (like any half-ready code or anything like that)
Thanks in advance!

Could you try the following sample?
https://github.com/firebase/functions-samples/tree/master/fcm-notifications

Related

How to send notification from one user to other in android studio using firebase [duplicate]

This question already has answers here:
How to send one to one message using Firebase Messaging
(5 answers)
Closed 1 year ago.
Please give the stepwise procedure to send the action notification from one user to other and after getting the notification , user have to give some response on the basis of that it may go to different activities.
Please suggest procedure/tutorial.
There are hundreds of tutorials online for various ways to do this, and they all depend on your framework, language, and available API
A good start would be Youtube
https://www.youtube.com/watch?v=wDpxBTjvPys

Android - Firebase Cloud Messaging Device to Device Push Notification Without Server [duplicate]

This question already has answers here:
How to send Device to device notification by using FCM without using XMPP or any other script.?
(3 answers)
Closed 5 years ago.
Is there a way to send push notification between 2 android devices without a server?
I found some tutorials but all of them was using the node.js for sending a notification. (Or I found that some samples that were using the firebase console for doing this)
Nope,
You need a "server" to do push notification. You can use a variety of services to do that, as you mentioned firebase is one of them. You may not need a full on server, but you need some kind of service to do that, you can't simply send notifications between devices straight away:
Some examples are:
AWS Serverless functions
Cloud functions in firebase
If you'd rather use one of these services, then you'll need to configure FCM in your app, you can check how to do that in the docs. And some nice sample codes here :)

FCM Topic Message doesn't appear on Console [duplicate]

This question already has answers here:
Topics on Firebase Cloud Messaging?
(2 answers)
Closed 4 years ago.
The FCM Topic creation takes way too long to appear in Console (14h to appear on Console). Does it mean that sending messages to that topic will also take the same time? I mean a client (Android app) subscribing to that topic has to wait for long to receive data (notification)?
FirebaseMessaging.getInstance().subscribeToTopic("MyTopic");
I have read this issue but unable to carve out my answer.
Thanks
Thanks to this SO Thread.
As soon as there is a single subscriber for the topic, it can be used immediately. But if you're going to use the Firebase console, it will take time for it to be visible in the options.

Firebase Spark Plan Cloud Messaging Limits [duplicate]

This question already has answers here:
Firebase FCM Usage Limits [closed]
(3 answers)
Closed 5 years ago.
I am trying to implement Firebase messaging service in my Application. The only use I make of firebase is to send data from my own created Web services and on the Android App side to receive these messages.
I don't use any other feature at all. I store the device token IDs on my own Database.
Suppose a million users have installed the App. Will there be any disruptions arising? I can't quite make out what the number of simultaneous connections means on the Pricing page. I am using the SPARK Plan.
The simultaneous connections referred to in the Pricings Page is for Firebase Realtime Database.
Firebase Cloud Messaging is a Free Service (also see my answer here).

Client to client communication with Cloud Endpoints [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to develop an Android application which would consist in a forum. I figured I should use the datastore to persist the members. However I was wondering how to implement the sending of posts and private messages to clients?
To be more specific, if A wants to send a message to B, what is the best way to handle this? Must I use Google Cloud Messaging or put A's message to the datastore, and then wait for B to query it?
It depends, both solutions are correct.
If you need instant messaging you should choose Google Cloud Messaging to implement this. Device identifier should be stored in the database, when a new message arrives it should be pushed to the specified device using the identifier. You should use notifications on Android side to notify user about new message.
You can also implement this using pull strategy. Message will be saved in the database and queried once user opens your application or clicks refresh button.
The technologies you've used in tags are the correct tools to implement such "forum" thing. Please read the documentation for Google Cloud Endpoints and Google Cloud Messaging because you'll find useful code snippets or even sample applications which will guide you how to achieve what you want.

Categories

Resources