Notification Settings on Xiaomi Devices - android

I'm currently working on a chat client for Android. When I've created the channel notification (only one for all the notification, am I doing something wrong?) I've set the priority to HIGH, and the notifications works like a charm. On Xiaomi Devices, settings for notifications of specific application are pretty different from the standard one. Settings for notification of a single application are:
Show notification
Floating notification
Lock screen notification
Sound
Vibration
Notification light
So, when I create my channel following Android guidance, my notification channel is created with only 1 and 5 active, and the result is that notification is not useful on Xiaomi devices if user doesn't setup them correctly from device settings. I can accept this behaviour if it will be standard, but I've tried to install Telegram to Xiaomi device and all these settings are enabled by default.
My question is: How they achieve that? How can I enable by default all these settings when I create my channel for notifications?

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.

Is there any way to totally disable notification channel features in Android O?

For example, if I open the notification channel settings for the Phone app in Android O and select the Incoming calls category, I can see that the Importance, Sound and Vibrate options are totally disabled (i.e. greyed out), so that the user cannot modify anything about them.
If I need to do this in my app, how can I do it?

Is it possible to create a Notification which doesn't generate Heads up Notification, but will appear in lock-screen

I am currently in a project which develops a DECT-based android system based on Android 5.0.1, and need to add a mode which will bring up the Dialer App while the InCallUi App is running (when there is an incoming call). When the Dialer App is in the foreground, there will be an annoying headsup notification from the InCallUi App showing the incoming call information displaying on the top of the screen.
I want to ask if there is a way to hide the headsup notification, while in locked-screen the notification entry can still be seen?
I have tried to change the priority of the notification, as indicated in the following link that the headsup notification only presented when the priority is set to HIGH, MAX and FULL_SCREEN: "If a notification's priority is flagged as High, Max, or full-screen, it gets a peeking notification.", but when I set the priority to LOW or MIN the headsup notification still shows:
https://material.google.com/patterns/notifications.html#notifications-behavior
Can anyone help? thanks:)
No, this was a security bridge on older versions of android that provided a way to services to run as ForegroundServices without the user knowing, that issue was fixed in android 4.4.
You can see this SO thread for more information.

Categories

Resources