Send push notifications on app install in Flutter - firebase

Is it possible to send push notifications on app install in Flutter?
By app install, I mean that a user who has just downloaded the app but not opened it yet.
I'm using flutter_local_notifications to handle notifications on the foreground and firebase handles background notifications.
But both don't seem to help with app install case.

It's impossible task:
There are a few preconditions which must be met before the application can receive message payloads via FCM:
The application must have opened at least once (to allow for
registration with FCM)
.
(c) Firebase Cloud Messaging

Related

flutter: is it possible to send push notifications offline using FCM and cloud functions?

i'm trying to build a dictionary app for both iOS and Android that sends 5-10 random words via notifications to the user on daily basis, and in this app im planning to send notifications using FCM and firebase cloud functions, and I was wondering if it was possible for the user to recieve the words(notifications) even if their device was offline and they didn't have access to Wi-Fi?
Actually no.
But you can prepare these words in online mode and when push it with flutter local notifications package offline
https://pub.dev/packages/flutter_local_notifications

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.

Firebase Cloud Messaging - Identify delivery status for a particular push notification message

Is it possible to identify whether a particular push notification message was delivered to a particular token via Firebase Cloud Messaging? And, if so, is it possible to do so via an API call or by listening to some callback?
I know that I can look at aggregate statistics in the console and even segment those statistics through analytics tags, but cannot find a way to get more discrete information.
I also know that the API will synchronously respond if a token is invalid but the process by which Apple and Google invalidate tokens is a bit opaque (to me) and doesn't help if someone simply turned off push notifications for my app.
Thanks!
Jason
If someone turned off push notification – you can check it with code
Swift ios check if remote push notifications are enabled in ios9 and ios10
Android app - detect if app push notification is off
But user can be offline, or APNs / Firebase service – can get some problems and your notification will be drop. You can check delivery status with some code in iOS and Android applications.
If you need check, delivery status for some push you can make push notification extension (in iOS). For send status about delivered notification in your API. More info about push notification extension.
https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension
It can be helpful
https://developer.apple.com/documentation/usernotifications
https://developer.apple.com/documentation/usernotifications/modifying_content_in_newly_delivered_notifications
https://firebase.google.com/docs/cloud-messaging/understand-delivery
https://firebase.google.com/docs/cloud-messaging/android/receive#handling_messages About handling messages in Android (you can send status delivered too)
I hope this answer will help with your problem.
UPD:
https://firebase.google.com/docs/cloud-messaging/understand-delivery
Received (available only on Android devices) — The data message or
notification message has been received by the app. This data is
available when the receiving Android device has FCM SDK 18.0.1 or
higher installed.

background push notification in ionic3

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.

Push notifications when user force quits the app

I have implemented onesignal in my iOS app as per the setup instructions given here (https://documentation.onesignal.com/docs/ios-sdk-setup).
When I install the app for the first time, I get notification from Onesignal dashboard.
When I kill the app, I still seem to get the notification.
But when I launch the app again, I stopped receiving any notification until I uninstall and install the app again.
So am I missing anything here? Do we receive push notification even if app is killed by the user?
You can receive push notifications on your app whether it is active, in background or killed using the NotificationServiceExtension.
The OneSignal documentation shows how to do this:
https://documentation.onesignal.com/docs/silent-notifications
Relevant Apple Docs:
https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension

Resources