background push notification in ionic3 - push-notification

I have completed an e-commerce app in ionic3. The problem is I want user to be notified when new offers or deals are added in our inventory. This should be a backend process, whether or not the app is open or close.
Note: There is no firebase involved.

If you want to use to get notification in same device then you can try Local notification native plugin for notification and if you want to send notification to other device then you have to use Push or FCM or Onesignal and yes this all required firebase to send push notification to generate device id/key.

Related

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.

Unsubscribe Firebase Push Notifications from unknown devices

I have implemented the Firebase push notifications in my web application.
I then subscribed from multiple unknown/random devices to receive these push notifications.
How do I unsubscribe unknown devices for my push notifications?
The ability to unsubscribe the user from firebase is still missing.
Refer this firebase document for more details
To do this you will need to call unsubscribe() on a PushSubscription (from the subscribed client)
I am assuming that is not possible in your case. Thus, I would advise you to
change your Web Push certificates from the firebase console.

Flutter FCM Push Notification Not Working when app is in foreground

I am sending push notifications using Flutter's firebase_messaging package and I send them in the firebase console. When the app is in the background or when it is closed, I am receiving the notifications, however, when the app is in the foreground it is not working. Please tell me if I need to integrate Javascript to make this feature work, and please reference a resource that I can use in order to figure out how I can integrate Javascript with fcm as I haven't found a way to do this with flutter.
I figured out that someone can use the flutter local notifications plugin so that when the push notification is sent and the app is on the foreground, normally no notification would be delivered to the system tray, but using the flutter local notifications plugin, it would be possible to send a local notification when the app is on the foreground.
To Understand better.
Have a look into this table.
https://pub.dev/packages/firebase_messaging#receiving-messages
It states that when your Android or iOS Application is in foreground, OnMessage callback is called if you are sending notification payload or data payload as notification body.
You are receiving notifications when your app is in background because, when an app is in background notification is send to system tray and OS (Android or iOS) handle it for you. And your app is launched when you click on notification from system tray.
When your app is in foreground you have to catch notification payload in onMessage and handle it explicitly, you can create local notification in this case.

Can I send Push notifications to those users who have un-installed my android app?

I unity developer, I used "onesignal.com" to send push notification to my active users. Now please guide me is there any way to send messages to those who have un-installed my app ?
the answer is no and another thing this is not logical to send push notification after the app is uninstalled.

Ionic Firebase push notification issue

I'm using Firebase for push notification. Problem is i want to send push notification for some mobile phones but when i'm sending push notification it will send notification to all installed mobile app
You would need to get the mobile token and then store it somewhere on your server.
Then you can send to specific devices using the mobile token.
Just in case, i actually wrote a full guide on how to implement push notifications to your ionic app here

Resources