Send push notifications with Ionic 2 to users group in background - push-notification

I want to display a push notifications in background for a defined users group.
Exemple :
Send Push for users in "group A" = User in group A show this push
Send Push for users in "group A" = User in group B don't show this push
In Ionic i have not seen a callback or others to filter received push by criteria (group ID for exemple)

If you are using firebase, you can use subscribe to topic.
You can also get more details in the docs

Related

How can I know how many users have joined through invite link of telegram group which I have created?

I have created a link of telegram group using createChatInviteLInk using my bot present in that group now i want see how many users have joined through particular link programtically
You should check invite_link in ChatMemberUpdated object. You'll receive it as Update (field chat_member) when a user join from link.
Note: chat_member is not default in allowed_updates. You have to specify "chat_member" there

Flutter : open a chat room for 2 users based on condition

hello I am building a chat app with firebase , and I already know how to make the chat room and make users chat with each other .
in my app i have a Cupertino picker which have some values , what iam looking for is
1 - if 2 users have selected the same value a chat room document will be created and both of them will chat with each other , what are the possible solutions for that ? .
2 - notifications based on topic that are dynamic should be by using cloud functions and typescript with onCreate method right ?
1 - you could do something like creating an object like this
users_waiting_for_connection -> user_id, selected_value, creation_time, ...
So when a user pick a value you check for elements in the list for the same selected_value.. if found you create the room and delete the object from the list, if not found you create the element in the list
2 - yup, you can find any info in the documentation
https://firebase.flutter.dev/docs/functions/overview/

Flutter: How to send notifications to users when a document with specific field values is created. (how to subscribe to topic with condition)

I want to add a "Notify me" function in my flutter app where the user enters a date and other values so when a document is created with those values, the user can get a notification. I'm unable to add any conditions in fcm.subscribeToTopic();.TIA.
You can create a cloud function and deploy it to firebase Functions, and in that function specify the path of collection (in which your document is creating) and it will trigger when a new document is created (write function for that. example ). in order to send notifications to that user store that user's device Token. you can find cloud Firestore Functions here.
some articles that help: firebase tiggers
Subscriptions to a topic are unconditional. The simplest way I can think of to implement this use-case is to create topics that contain the specific conditions that you are interested in, like date_20210823_value_yourvalue.

How to give 1 firebase id to 2 users in flutter?

I'm trying to make chat app in flutter using firebase. And i want to know, can i make chat using users id? I mean chatID=user1ID+user2ID, is it possible?
I think you can add a field of type array to your chat document and name it as chat _user and just pass the two users ids to it as like this =>

telegram api contacts.importContacts return empty

i have 1800 contact in my telegram account , when i want add more number it's return empty array like below:
{"_writeBuffers":null,"_readOffset":828,"_buffer":{"type":"Buffer","data":[21,67,82,173,21,196,181,28,0,0,0,0,21,196,181,28,100,0,0,0,0,0,0,0,0...]},"_typeId":"15c4b51c","_typeName":"Vector","module":"api.type","type":"Long","list":["0x0000000000000000","0x0000000000000000"],"_byId":{}},"users":{"_writeBuffers":null,"_readOffset":8,"_buffer":{"type":"Buffer","data":[21,196,181,28,0,0,0,0]},"_typeId":"15c4b51c","_typeName":"Vector","module":"api.type","type":"User","list":[],"_byId":{}}}
and cant add contact from telegram mobile or other telegram app with current number,is any limit for that?
how can add more number ?

Resources