flutter_firebase_chat_core
flutter_firebase_chat_core copied to clipboard
Does it support push notifications?
I believe you need to write your own firebase cloud messaging function for push notifications
Will leave this open to add some documentation examples
Will leave this open to add some documentation examples
Any news about this?
@SalahAdDin when something is changed I always update the issue, there are other things we are working on right now. I am sure there are tons of resources on how to add push notifications to FCM and it is doable without any "examples". I have left this open for anyone to share the setup, if that will happen before we get to this ourselves.
I think the problem for you going to be that you need to hold the fcm token on the server somehow. Im using realtime database for that because firestore charge per read and write and it can be really expensive for something that has high read and write Frequency
but thats how i did it on the firebase functions here is an example : https://paste.ofcode.org/33gBdZAH3iLNYd82meFdLQe
you should be aware that this library is very expensive and its only for mvp and not for scale.
It is correct, this is not for scale. I mean creating something to scale requires paid developers I guess, not a free library.
I want to believe that not, there are some projects but they not are not in nodejs so i skipped. thats great library for a lot of people, i improved it and i have architecture that can scale easily to a lot of users without costs on firebase. but i think you should add advise to people to add limit to firebase because some cute junior can get 1000$ bill easily with that
Will do, thanks for the suggestion!
Btw you mean you combine Firestore with Realtime Database, or you use Realtime Database only?
im using realtime db, in a way of a pipe. its not good for every application but for me it does. you have whatsapp? whatsapp dont save your data on their servers, they just hold it till you sync it to your phone and then delete it. and because realtime db not charge per operation so its pretty cheap. the problem with firestore is that their developer that invest too much time to help us reduce costs. when you read 100 documents so yes there kind of cache mechanism but you can be sure that 100 read going to be 10,000 per device
yeah, it is a very specific use case, which should be developed from scratch for a particular project. With this lib I just wanted to make something that work quickly, to show the MVP or even use it until you have like thousands of users, that means money, that means you can develop your own scalable solution.
yes cool, its also why im using your library :)
I think the problem for you going to be that you need to hold the fcm token on the server somehow. Im using realtime database for that because firestore charge per read and write and it can be really expensive for something that has high read and write Frequency
but thats how i did it on the firebase functions here is an example : https://paste.ofcode.org/33gBdZAH3iLNYd82meFdLQe
you should be aware that this library is very expensive and its only for mvp and not for scale.
can you share this code again?
Acho que o problema para você será que você precisa manter o token fcm no servidor de alguma forma. Estou usando o banco de dados em tempo real para isso porque o firestore cobra por leitura e gravação e pode ser muito caro para algo que tenha alta frequência de leitura e gravação
mas foi assim que fiz nas funções do firebase aqui está um exemplo: https://paste.ofcode.org/33gBdZAH3iLNYd82meFdLQe
você deve estar ciente de que esta biblioteca é muito cara e é apenas para mvp e não para escala.
can you share this code again?
Acho que o problema para você será que você precisa manter o token fcm no servidor de alguma forma. Estou usando o banco de dados em tempo real para isso porque o firestore cobra por leitura e gravação e pode ser muito caro para algo que tem alta frequência de leitura e gravação
mas foi assim que fiz nas funções do firebase aqui está um exemplo: https://paste.ofcode.org/33gBdZAH3iLNYd82meFdLQe
você deve estar ciente de que esta biblioteca é muito cara e é apenas para mvp e não para escala.
Could you send it again?
https://medium.com/@duytq94/flutter-chat-app-extended-push-notification-messages-a26c669f4675
You can try this link to send push notifications using firebase cloud functions.