How to send push notifications from a dashboard to a flutter app? - flutter

Currently working on a dashboard that controls and manages multiple processes going on in a flutter app (the link between them is firebase). Once I make a few adjustments on the dashboard, I want to be able to notify the user through a notification. Is this possible? Are there any useful resources for this?

Everything you need to know is present in the official Firebase Cloud messaging documentation :
https://firebase.flutter.dev/docs/messaging/overview/
Follow every steps carefully and you'll make it successfully work ;)

Related

How to setup notifications in flutter application?

I was wondering if Flutter has the ability to generate push notifications from within the app. If so is there a code example of this?
Description:
An event occurs on the flutter app such as a button being clicked or an if statement being triggered, I want a push notification sent to the user.
The app should also always be running in the background, is this possible? If so can you provide me a link with an example of this implementation.
Thanks in advance for all the help!
I have looked on google but I haven't been able to find a lot of information regarding these two topics.
Being an iOS engineer, I'd say that you actually want local notifications. Push notifications are usually being sent by a server.
You could check how it's usually done on iOS natively: developer.apple.com.

How can I fetch data from Firestore in background/terminated app status? - Flutter

In the past, I have used Firebase Cloud Messaging to send and receive notifications in my Flutter apps, but it is extremely limited in the notification types and ways to send notifications. I do not want to use Cloud Functions because they are complicated and I don't want to use the POST method because that makes it possible for keys and credentials to get leaked. My idea is to make a collection of notifications in each user Firestore document (which would need to be done anyways for in-app notifications) and then check in the app background for new notifications. Then if there are new notifications I would use awsome_notifications or another package to create customized notifications. I know this is possible when the app is open but cannot figure out how to do it in the background. I found a package https://pub.dev/packages/background_fetch but it seems complicated and I don't see any examples of actual code being called. I'm sure other people have tried something similar so are there any examples?

Is there a way to find out if the user is online or not in flutter

Please I want to create an online or offline feature for users in my app
I tried onDisconnect in Firebase and it didn't work for me
You can use socket.io for flutter. When user open the app then socket will tell the server that specific user is connected.The user able to see other connected users. Here is a article of how to use socket.io in your project.
You can try pusher presence channels.
It is based on websockets, and it tells you who is connected to the channel (who is present). You can find the use cases for presence channels here.
click here to find out how to build presence channels.
I'm currently building an online and offline statusbar for a flutter app if a user is connected to a presence channel. If I have the working code I'll post an update.

Implementation of WhatsApp/Telegram like calling feature in Flutter

How can I implement WhatsApp/Telegram like call notification when the flutter app is in the background or cleared from the recent task (clearing ram)? Can anyone let me know Exactly How to do this?
There is a great youtube series on this exact topic. In the series, a YouTuber by the name of the CS Guy creates a clone of Skype. I've placed the link to the video where he explains how to create a pop-up screen when a user calls another user, however, you may need to watch the previous videos within the series in order to get everything working. Its quite long but I recommend you watch the entire thing. In terms of displaying notifications when a user is called, I recommend you watch a video by Fireship listed below. In the video, he explains how to send notifications in the background when a certain event occurs in Firestore.
I can't explain the entire process in detail to achieve what you want but I can give a general overview of what you would need to do.
Watch the video/entire series by the CS Guy and complete everything
Learn how to send push notifications in firebase from Fireship
When a new document is created within the calls collection (You will understand once you finish the cs guy series) trigger cloud function.
Find the uid of the receiver of the call within the cloud function and grab the user's token from Firestore.
Finally, send a notification to the receiver telling them about the incoming call.
CS Guy:
https://youtu.be/v9ngriCV0J0
Fireship: https://youtu.be/2TSm2YGBT1s
I have done the exact same thing in my application and can help you out if you need further assistance, however, please go through both videos/series first.
You can use the flutter_local_notifications plugin with the firebase_messaging plugin.
From the documentation of the flutter_local_notifications plugin;
[Android] Support for the following notification styles
Big picture
Big text
Inbox
Messaging
From the documentation of the firebase_messaging plugin;
With this plugin, your Flutter app can receive and process push notifications as well as data messages on Android and iOS.

Is there a function to get push notifications in flutter? For example Facebook or Whatsapp notifications

I am wanting to develop an app similar to 'Notiduino' where it takes android notifications such as whatsapp message notifications or missed calls and retrieve them within the app. Is there any lib for this function? I searched and found nothing ...
Sorry for my bad english
Yes. You can use Overlay widgets. Combining them with a little bit of animation will give you effective UI. One example here and another is here.
You can also use Firebase in-app notification. Using Firebase in-app notification has one more advantage. You can also send push notifications from the same firebase project. Of course, relevant settings have to be made. Having said that, there are a bunch of web pages which will guide you through the step by step process.