How to allow floating notification and lock screen notification programmatic in flutter - android

To implement push notification, Firebase Cloud Messaging is used.The notification is received successfully in the device but it has to be a pop-up(Floating notification) and it should also be displayed in lock screen.
Notification is composed using Admin SDK in node.js environment.
Please help to show the notification as a floating and lock-screen notification.
plugin used in flutter is firebase_messaging.

I suspect that it is not possible.
On some launchers that are enabled when in some it is disabled (for energy-saving purposes I guess) by default.
The user should enable it manually from app settings=>notification section manually.

Related

How to create bubble notifications on Android?

This video # 0:17 shows a bubble-style push notification on Android. Messaging apps like WhatsApp often use these.
I'm building an app with Capacitor 3 but can't find how to send these kinds of push notifications. Is there a plugin I could use, or some way of configuring just a normal push notification to display like this?
It turns out this is the default style when the 'brief' notification style is selected in the notifications setting on the phone. It isn't set programmatically as some kind of notification config.
Mine wasn't showing because the 'Show as popup' option was disabled for the notification channel I was testing. When I created a new channel, it was set to show notifications as popups, and then they started showing like in the video.

Set Firebase Notification to appear as Popup like whatsapp in Android studio

I am building an social media app in Android studio, this app uses firebase for push notifications, and notifications is working fine, that Is notifications shows on device's notification bar.
How can I change the behavior so that the notification can appear as popup when app is in foreground?
I want a persistent kind of notification, something like WhatsApp that can stay on top other apps so that users can quickly open notification on wherever they are on their phone.
On my research, the best i could get was to use this on my theme
But I do not have Theme.Holo.Dialog in my style and my aim is that the notification should appear even if app is not open.
Thank you for looking into this
You should use heads-up notifications
For this purposes you should use notification channel with high a importance: How to set importance in the notification channel.
In this answer you can find code sample, how to show notification in the channel with high importance(to show notification even if the app in the foreground):
https://stackoverflow.com/a/67953864/16210149
Hope it would be helpful.

Show firebase notifications when android app is open and with high priority

I am using nativescript-plugin-firebase for the APP and I get the notifications when the app is closed.
However, if the app is open I don't get any notifications. Is there any way to force showing push notifications even when the app is open or do I have to create a custom notification with sound within the app?
Another problem that I have is the way the push notifications are displayed. I use Laravel-FCM to send push notifications from the server-side, I have the priority set to 'high' and everything else set to default but when I receive the notification to the android device there is no floating notification, only a badge icon and a notification in the notifications center.
In the app notifications settings, there is Miscellaneous Notification Category with Importance set to Default, Vibration set to OFF and LED Light is also OFF but if I manually change those settings then firebase notifications appear with floating notification and vibration.
Any way to actually make these notifications with high priority by default?
P.S. The device I am testing on is Xiaomi Redmi Note 8 Pro
I have the same problem when using Nativescript-firebase as yours. When the app is open, the push notification is delivered but not shown (see onMessageReceived callback) then you can use Nativescript-local-notification to show the content of the push notification received when app is open.

android O not receiving FCM push messaging while phone is in sleep mode

I am using FCM for push messaging. I did not getting FCM notification if application is closed by user in android Noughat OS.
If user not close app, push notification works fine.
also if user add application in protected app from setting->protected apps app works even in sleep mode.
In settings, you need the settings as below
Settings->Notification->App->On the lock screen
It should not be do not show at all. By default it is always hide sensitive notification, hence if notify not defined as sensitive, will be hidden.

Android - an app to disable facebook push notification

Is it possible to create an app that it's sole purpose is to toggle on/off the facebook push notifications? (like a silence for facebook)?
If you give your app notification-access permissions you should be able to dismiss the notifications as soon as they pop-up, but the user will still get notified (sound or vibrating), although he won't see the notification when the device is unlocked as your app would have dismissed it.
Pushbullet does that.
In any case it's no use, the user can go to the Facebook app details and uncheck the notifications box.

Categories

Resources