push notifications ionic 2 for android - push-notification

I need to configure push notifications for an Ionic 2 application for android devices.
I read here that in order to do that you need to login to Firebase console, create a project and so on...
So my question is, do I really need to log into Firebase to do this? I'm not using firebase in my app, so I donĀ“t get why I need to create a project to get a SERVER_ID and SERVER_KEY. What if I delete that project in Firebase afterwards, then my push notifications will stop working?
Thanks

Yes, you do need an account to use Firebase Cloud Messaging because you'll need a key to send pushs.
You need the key to use device-to-device push via HTTP and you need a project to send notifications to a group or topics.
I don't think that there's a way to use push without creating an account in any service.

You don't need a Firebase account.
You can use azure notifications hub or amazon aws or google cloud service, ionic cloud, etc.
Any cloud services that provides a notification hub which is basically a server for receiving and redistributing to the registered parties to the specific platforms.
Please note that some of these are specifically mobile oriented meaning you wont have to write any server side code and others aren't.

Related

Firebase push notification device to device

I am coding a React Native app and I using Firebase push notification service.
In my app, users can send message for each other and I want to notify them when they get message.
I found one way for native android I can code for react native it is not problem just I want to know if there is better way. I can make post to directly to Firebase service with using Http post.
This is the link which way I found: https://blog.usejournal.com/send-device-to-device-push-notifications-without-server-side-code-238611c143
I want to push notification to specific device without server, is there another way to do this?
Sending a message to a device with Firebase Cloud Messaging requires that you specify the FCM server key. As its name implies, this key is supposed to only be used in trusted environments, as knowing it allows one to send any message they want to all users of the app. For this reason it is not possible to secure send messages directly from one device to another device with FCM.
Instead you will have to run code in a trusted environment, such as your development machine, a server you control, or Cloud Functions. Your client-side application code invokes the server-side code, that ensures the call is authorized, and then calls the FCM API.
For more on this see:
How to send one to one message using Firebase Messaging
How to send device to device messages using Firebase Cloud Messaging?

Show notification based on a Firebase values

I want to show notification in my app even if the app is closed.. I don't need Firebase's Push Notification Service. The idea is similar to WhatsApp's message notification service.
When a value is added to firebase by a user another user should receive notification that there is a value change
Can someone tell me how this is done and What should I use to achieve this?
Push notifications for all major apps run through APNS for iOS, and Firebase Cloud Messaging for Android. While the apps may use a higher-level service from their application code, those services depend on APNS and FCM for the actual message delivery.
To see an example of how to build a notification system on top of this, based on values being written to a database, see Send Firebase Cloud Messaging notifications for new followers.

Does mongodb-stitch support push notification for ionic?

I am following this tutorial in mongodb stitch. https://docs.mongodb.com/stitch/tutorials/push-notifications/
However it looks like this one is for android app only. I am developing an ionic app using mongodb stitch. Do you think mongodb stitch supports push notification for my ionic 3 app?
Following your link reveals that MongoDB cloud services actually do not provide a complete standalone solution for push notifications. They suggest to setup Firebase Cloud Messaging (FCM) for this and you can configure stitch to trigger a push notification via FCM. You would need to setup firebase (free tier) for that and stitch separately. I do not know if that scales well and is at the time of my answer a big downside of MongoDB services.
Yeah, they just provide an example via Android, but I think using it on client side is very straight forward. The most part is configuring the backends.
I hope that helps.

Is Firebase client SDK necessary for simple APNS?

I have a project that currently sends PNs through APNS and I'm investigating using Firebase for this purpose. I would prefer that the push notifications be sent through APNS and Firebase merely acts as a wrapper/intermediate around APNS. I'm not using any other feature of Firebase(storage, persistent connections, messaging, etc) either.
All guides/examples on this topic seem to integrate the Firebase SDK and relevant config files but I don't see the need for any client side change if the notifications are going to go through APNS.
Do I really need the Firebase SDK for simply sending PNs? If yes, for what reason?
You only need the Firebase SDK if you intend to use the service.
The behavior of FCM, as you know it, is that when you send a message with FCM, it forwards the message towards APNs, which in turn would send it to the iOS device.
If you're already fine using APNs alone for the push notifications, then you technically don't need the Firebase SDK.

Is it possible to send push notification to multiple Android applications without manually registering it in Firebase Console?

I want to notify updates from server to a set of android applications. I want to know whether it is possible with Firebase push notification service without manually registering the apps. If it is not, please help me with any other solution.

Resources