Learn Courses My Dashboard

Remote/Push Notifications

Hi Guys,

I am building an app. I don’t know how to implement a certain feature. How can I send push/remote notifications to other devices with that device’s device token? Is there a way I can send push/remote notifications to other devices through code?

Thanks,
Pratham

Hello… Usually you need a push server… Its quite a complicated process… If you have firebase you can use firebase cloud messaging for this (this is thier push service)

1 Like

Thank you so much for getting me back to me! I will try that!

I just took a look into push notifications and boy is it a lot of work!

2 Likes

Also I have one more question. When integrating device to device push notifications, should I create a certificate or an auth key?

yes you will need a certificate (.p12 file) and the auth key is probably a key from the Firebase Messaging Service settings

1 Like

so I need both?

Also, I happen to have one more question, can I use both the cloud firestore database and the real-time database in the same app?

i think it should be possible… but why would you want to mix them up? firestore already has an “offline” mode anyway so it will work even if you dont have internet… it will just sync up once you get connected (doesn’t apply for file uploads though)

you probably need to check documentation on how to do this but yeah i think it needs both

I need to implement a chat feature in my application but I know how to use and work with Cloud Firestore but don’t know how to use the Firestore Realtime Database.

Even in our tutorials though we do not use the real time database as well… Do you just want to practice using it? Theres really no need to use both in the same app

So is it possible to build a chat app with cloud firestore?

i don’t see why not, its being synced really fast as long as you are connected to the internet… i suggest to try it out using 2 different devices so you can see just how fast you can see it update in the other device

1 Like

got it thank you!

Upon further reconsideration, should I use Core Data and Cloud Firestore in the same app?

Theres no need to use coredata actually since the data from firebase is also available offline so it will work even without network… Its just that it caches everything and only syncs the changes once your network is back