I want to send notification to some particular segments but some items are disabled.I implemented firebase in unity.
it seems that we should give permission to Share Analytics data with all Firebase features,(project setting>>data privacy)
Related
I have already built a chat app to practice flutter and I would really like to integrate push notifications that notify the users when a new message is sent but I don't seem to find any relevant information on the internet about this topic, I am currently using firebase. what can I do in order to achieve this functionality?
Since you are already using firebase, look into Firebase Cloud Messaging. You'll need to
Save each user's device tokens in Cloud Firestore and Realtime Database
When a message is sent/written to the database, trigger a cloud function to send a notification through Cloud Messaging.
you have to use firebase cloud messaging by you have to safe each user token id
that will be notify users for a particular event
check my repository in developer branch where I implement push notification by
using firebase cloud messaging
my repository for push notification
How can I send different push to different Countries via Cloud messaging? I searched the official documentation for an answer, but I couldn't find anything. I need this for Android. Thank!
There is no built-in feature to target users by geo in Firebase Cloud Messaging.
The first two options that come to mind are:
Define an audience with Google Analytics for Firebase of users in the region. Then use the Notifications panel in the Firebase console to send a message to that audiebnce.
Subscribe each user to a topic for their region when they start the app, and then send the message to the topic for each region.
I'm thinking about implementing Firebase Cloud Messaging without implementing a firebase database and it's unclear to me which features of FCM are supported without having a firebase database.
For instance, getting message delivery statistics (https://firebase.google.com/docs/cloud-messaging/understand-delivery) and sending notifications via the firebase console (https://firebase.google.com/docs/cloud-messaging/js/send-with-console). It doesn't explicitly say whether you need a firebase database in either of documents but I'd like to clear about that before implementing it.
So my question is, do you need a firebase database to send notifications via the firebase console or to view message delivery statistics? I know for the latter you need to implement google analytics. And also as a bonus, are there any firebase features that depend on having a firebase database?
Thank you
All FCM features are supported without having to use Realtime Database. They are completely separate products, and are only related as much as you want them to be in your app.
I'm working on a Progressive Web App (PWA) and I need to send important reminders through push messages. Users should receive them even if they are offline.
Is it possible to use Firebase Cloud Messaging (FCM) for that (maybe preload the messages or something like that?) or do I need to get a different route for offline?
Adapted after AL's comments below and Frank's comment above
It is possible to send "push messages" via Firebase Cloud Messaging (FCM) to a device that is offline, BUT the user will only see the message when the device is online again. If the device is offline it cannot receive immediately any (push) message from the "external world". If you want to trigger some reminders that are immediately visible for a device which is offline, you will have to do it locally, on the device, and not by relying on a push from the "external world".
So, having said that, if you want to use Firebase Cloud Messaging to send messages, you can do it by using Cloud Functions, i.e. from a "trusted environment". Have a look at this official Firebase Cloud Function sample: https://github.com/firebase/functions-samples/tree/master/fcm-notifications
You could trigger this Cloud Function when e.g. a new item is saved in the database (Real Time Database or Firestore), or an existing one is modified/deleted, or a file is uploaded to Storage, etc.
what is difference between Push notification and cloud message?
is registration id and device id store in third party ?
Push Notification is a notification that appears on a client app, usually like a popup, that is pushed from a server. That's it. Pretty straightforward. You could also check out this searchmobilecomputing link for a good explanation, or even just doing a quick Google search would return you a lot information about Push Notification.
Cloud Message on the other hand is something vague. If you're referring to the Cloud Messaging in Google Cloud Messaging, then I believe you're giving it too much thought. Google Cloud Messaging (now known as Firebase Cloud Messaging) is the name of Google's free push notification service.
For the registration token, I believe Google stores a copy of the tokens on their end, but doesn't keep track of them. It is the developer's responsibility to keep track of the tokens i.e. storing them in a trusted and secure server.