Hi, nice tutorial. But i need your help bcz im facing an issue that is like, in terminated state, when i click on a notification, it navigates me to a specific screen which is working perfectly, but im calling some REST Apis on the splash screen and when Apis calling done my App takes me back to the home screen but i was already navigation to specific screen when i click on notification popup. Any idea how i can solve the issue. THANKS IN ADVANCE
Hey Brother, very helpful tutorial for me. I want to know one thing and I will be very thankful if you answer. i want to know that how you have got the display of Redmi Note 8 emulator. I am finding a solution to run emulator other than Pixel which are available by default in Andorid Studio.
That is a real device not and emulator I was just screencasting from it, you need to enable usb debugging on your phone then you can run and test on actual device.
Buddy amazing tutorial. How to send notification on any device, because if someone installs my applications, how will I send it to him without registering his token to on FCM? Basically I want to send a notification to anyone who installs the app.
For that use local notifications, create a function in your app that will send a notification to the user automatically without needing fcm tokens. You need to call that function and it will show a notification you can add a delay if you want.
Unfortunately this is not possible , if you are using firebase_messaging package, then it will use the default one for showing notification in background and terminated state. I have tried to use flutter_local_notifications package for background , but it is showing 2 notifications at once one for flutter_local_notifications and one for firebase_messaging default .
Hello brother, I would like to send the message through a specific event in the realtime database instead of sending it manually using publish. How can I link between FCM and realtime database?
Hi ! i am basically a php developer recently started to learn android. I have one issue . My push notification work well when app is foreground but no notification comes when my app is either killed or run in background. How can i fix this ??
May be you have skipped some step in background and terminated state process, try to figure that out. Cause if it is working in foreground then it means you have no problem with firebase setup, problem may be in code for background or terminated state.
Kind of difficult, but you have to downlaod a json with the credentials of your firebase admin. Then you have to install the firebase-admin SDK for your server, mine was made with nodejs so I installed the firebase-admin SDK for nodejs. Then you have to use the .json file with your credentials to initialize your app and then you can start sending notifications using the SDK
Its helpful sir tq,create tutorial on sending push notification using flutter fcm http v1 api......coz its deprecated no one yet posted a detailed video on this
if the _firebaseMessaging.requestPermission is set to this then it will show the pop otherwise it may not show. await _firebaseMessaging.requestPermission( alert: true, announcement: true, badge: true, carPlay: false, criticalAlert: true, provisional: false, sound: true, );
You need a backend that, use firebase admin package on backend to send notification, call that backend endpoint from your phone to send notification to other device.
Actually the code for showing background notification is written in either java or kotlin we cannot modify it directly from flutter, but we can call the function to show background notification. If we really need to modify it then we need to override it by creating a new class of FirebaseMessagingService in java or kotlin to customize the notifications as we like, but the steps will be difficult and knowledge of java or kotlin is required.
Best video. Notification and firebase authentication both covered within an hour. ❤
You saved me, Ty, its working here, finally i can send a push notification to my costumers
How do you handle iOS terminated state? In terminated state it is not possible to call any app code without opening app first.
Thank you a lot brother you save me hours today, much appreciated
Hi, nice tutorial.
But i need your help bcz im facing an issue that is like, in terminated state, when i click on a notification, it navigates me to a specific screen which is working perfectly, but im calling some REST Apis on the splash screen and when Apis calling done my App takes me back to the home screen but i was already navigation to specific screen when i click on notification popup.
Any idea how i can solve the issue. THANKS IN ADVANCE
Hey Brother, very helpful tutorial for me. I want to know one thing and I will be very thankful if you answer. i want to know that how you have got the display of Redmi Note 8 emulator. I am finding a solution to run emulator other than Pixel which are available by default in Andorid Studio.
That is a real device not and emulator I was just screencasting from it, you need to enable usb debugging on your phone then you can run and test on actual device.
Buddy amazing tutorial. How to send notification on any device, because if someone installs my applications, how will I send it to him without registering his token to on FCM? Basically I want to send a notification to anyone who installs the app.
For that use local notifications, create a function in your app that will send a notification to the user automatically without needing fcm tokens. You need to call that function and it will show a notification you can add a delay if you want.
Welcome.. i want send notifications by backend api ..such as backend laravel
Please try to implement from scratch we need configuration part of firebase in flutter where to add dependency etc please guide
When the app is in background, can I use another notification package instead of the default one? Please help me!!
Unfortunately this is not possible , if you are using firebase_messaging package, then it will use the default one for showing notification in background and terminated state. I have tried to use flutter_local_notifications package for background , but it is showing 2 notifications at once one for flutter_local_notifications and one for firebase_messaging default .
Hello brother, I would like to send the message through a specific event in the realtime database instead of sending it manually using publish. How can I link between FCM and realtime database?
For that you need to use cloud functions, or you can use a backend server, that will listen to realtime database changes and trigger notifications.
Hi ! i am basically a php developer recently started to learn android. I have one issue . My push notification work well when app is foreground but no notification comes when my app is either killed or run in background. How can i fix this ??
May be you have skipped some step in background and terminated state process, try to figure that out. Cause if it is working in foreground then it means you have no problem with firebase setup, problem may be in code for background or terminated state.
How to send notifications from the backend sir ?, please make a tutorial
Kind of difficult, but you have to downlaod a json with the credentials of your firebase admin. Then you have to install the firebase-admin SDK for your server, mine was made with nodejs so I installed the firebase-admin SDK for nodejs. Then you have to use the .json file with your credentials to initialize your app and then you can start sending notifications using the SDK
@@gonzalobruna7154 do you have a tutorial?
Its helpful sir tq,create tutorial on sending push notification using flutter fcm http v1 api......coz its deprecated no one yet posted a detailed video on this
Thank's for class teacher
How notification did not pop out in background and terminated state as like active state ?
if the _firebaseMessaging.requestPermission is set to this then it will show the pop otherwise it may not show.
await _firebaseMessaging.requestPermission(
alert: true,
announcement: true,
badge: true,
carPlay: false,
criticalAlert: true,
provisional: false,
sound: true,
);
Thanks a lot it worked
23:17 android manifest
33:34 show when locked
complicated but thank you
How to send notification admin to user?
how can we send notification from one device to another
You need a backend that, use firebase admin package on backend to send notification, call that backend endpoint from your phone to send notification to other device.
how do you customize the title and body in the notification in background
Actually the code for showing background notification is written in either java or kotlin we cannot modify it directly from flutter, but we can call the function to show background notification.
If we really need to modify it then we need to override it by creating a new class of FirebaseMessagingService in java or kotlin to customize the notifications as we like, but the steps will be difficult and knowledge of java or kotlin is required.
I am glad you have replied and thank you