I am using FCM Cloud Messaging framework to send and receive push messages for both Android and ios. To send messages from my server I call FCM v1 API. I use FCM SDK app in my native app (react native based) to generate device registration token, etc.
I am trying to find ways where the push messages show grouped in device system tray like on Whatsapp i.e. messages containing a particular unique id should be grouped under one category e.g. all messages for a particular stock ticker showing under one group, etc.
When searching for possible solutions I came across various links such as:
React Native - Android - FCM - Display group notification like What's app also allowing multiple grouped notifications
Group fcm notifications like whatsapp but allowing multiple group notifications
But none of those helped. For example sending "tag" field replaces previous message when new one is received with the same value. Moreover when app is closed none of the message handling functions of native app are executing on the device so I believe this should be purely a server side functionality. On FCM docs page there is no reference to grouping of messages.
https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages
Any suggestions on how to implement this ?
I implemented that with the help of the library react-native-push-notification and this issue helped me a lot Group notifications
Related
I'm facing a really random error that I cannot debug, for the life of me. I've tried everything, so I'm really hoping someone here can help.
I've created a React native app for iOS and Android, and I'm using FCM for data messages and notifications.
Specifically, I'm using topics to send notifications.
Here's the weird part:
It works sometimes and sometimes it doesn't. This is across different users and different topics. I will get a notification for a topic I've subscribed to one day and the next day, I won't get a notification sent to the same topic.
Some users will get a notification and some users don't. And they are all subscribed to the same topic.
There are no error messages. I assume this is something to do with FCM? I am at a loss on how to debug since it's so random.
Any suggestions?
Over searching, I found various solutions such as -
1 - Web Scraping using selenium but that is a very inefficient way to track multiple contacts
2 - Using store object. That was one of the best ways to track WhatsApp online status for multiple numbers but after the recent update, WhatsApp has stopped showing the online status of unsaved, unchatted contacts due to which all these methods have failed.
but I wonder how various applications like -
. https://chatwatch.net/
. https://play.google.com/store/apps/details?id=com.familog&hl=en_IN&gl=US
are still able to track the online status ?
After 6-7 December update, you can't.
Your ways:
Mock the XMPP Protocol
Create a real device (like emulator or android phone) and get the data on client.
Create a real device (like emulator or android phone) and get the data from Whatsapp Web.
Mock the Whatsapp Application.
Man in the middle attack to whatsapp application.
These ways deprecated because after 6/7 December Security Update if you don't have whatsapp chat history with this number, you can not subscribe his presence.
After today, if you want to track someone you have to chat with him. If you message the person you will follow before following, this will be detected by whatsapp and you will get banned.
In my current project I am using the Kreait Firebase PHP SDK to send out push notifications to Android & iOS devices that have subscribed to notifications on named topics. No issues thus far. However, rather than have fixed topic names I would now like to generate topic names based on the current "condition" of the connecting device. The condition could, for example, be a geographic location.
This is not too difficult either and I have modified my app to handle this. However, in order to put the ability to have such autogenerated topics to use I need to know the topic names on my server so I can send out targeted messages via Kreait. I find Google's Firebase documentation a bit dense at times and have not been able to establish whether it is possible to assign webhooks that get called by Firebase whenever a SubscribeToTopic, UnsubscribeFromTopic event occurs.
A simple question - does FCM even offer anything like this capability? If so, any pointers to the relevant documentation would be much appreciated.
There is no public API to get a list of topic names from Firebase, nor is there a way to hook into the subscription mechanism.
Your best bet is to simply make two calls when a user subscribes to a topic: one to Firebase, and one to your own backend API that keeps a list of active topics/conditions.
On a React-Native mobile app, I need to access the contacts list, which is stored on the mobile device. The following 2 libraries provide this functionality. However, it seems that none of them provides information about which contacts have been updated (added/deleted/changed) recently.
Is there any library, which (1) provides some sort of notifications, which my app can subscribe to, to get updates about the contacts' list, or (2) provide a timestamp for when each contact was last updated?
I looked into the following libabries, but they do not seem to have this functionality.
Expo Contacts (https://docs.expo.io/versions/v35.0.0/sdk/contacts/)
React-Native-Contacts (https://github.com/rt2zz/react-native-contacts)
Your feedback is highly appreciated...
I saw this in the Expo Contact library : Notifications Expo Contact
You just need to add listener, and after u can sort by categories :
Notifications.addListener(listener)
Notifications.createCategoryAsync(name: string, actions: ActionType[])
it return an EventSubscription object , u can remove notifications by :
EventSubscription.remove()
Hope it will help,
If you need a easy way for notification, Firebase CLoud Messaging is the easiest way for configuring notification, and you can send global notification too by the firebase admin panel ,
This is not currently possible. If you want this feature please request it in the issue tracker and we can deliberate.
The library would have to expose an event the javascript can register a listener for.
I'm new in xamarin. I need to implement a mobile app with push notification (maybe using Firebase) with user authentication. One user can send a notification to one or more than one user. So far I cannot find the right tutorial.
Would you help me find the way to implement a mobile app with push notification (maybe using Firebase)? Thank you in advance.
Hi flo you can start with this which can help you to get into working of FCM.
and here you can get the topic messaging i.e. sending to multiple devices and at this place you can see the steps which can be used for xamarin you just have to see the corresponding files in xamarin.