356 questions
0 votes
1 answer
62 views
How to block a notification entirely?
I'm running a service extending NotificationListenerService: class NotificationBlockerListenerService : NotificationListenerService() { override fun onNotificationPosted(sbn: StatusBarNotification)...
1 vote
2 answers
2k views
How do I set the notification icon to a specific color?
I am trying to set notification icon which I generated using Android Image Asset. Generated image has just white color and some transparent part. I pasted here piece of code here. Which doesn't ...
0 votes
1 answer
135 views
Android - Disable notification bar
My requirement is to lock my app in foreground for a particular time period. During that time, I have to disable the notification bar like restrict taking incoming calls from the notification. I have ...
0 votes
1 answer
879 views
How to combine all app notifications together?
I want to show the app name on top and all the notifications of the app clubbed below it. I am receiving the notification from firebase and using this code: val messagingStyle = Notification....
1 vote
0 answers
342 views
How to prevent head-up notification from dismissing when it is clicked in Android 6?
As i wrote in the title of this question, how can i prevent head-up notification from dismissing when it's clicked? this only happens on Android 6 Mashmellow(API 23). If i click the head-up ...
2 votes
2 answers
823 views
How to update progress in notification without notification icon blinking?
In my Android application i am downloading files inside a Foreground Service. Before starting downloading i am displaying a notification with 0 progress and then updating the progress in ...
5 votes
1 answer
11k views
Custom Android notification sound
I'm trying to implement a custom notification sound in my application. I have written the following code, but the application plays only default sound and not the custom sound i've added in raw folder....
0 votes
1 answer
1k views
Custom notification is not showing in the android notification panel
I'm trying to implement a custom notification in my project using Kotlin language. But, it does not show in the notification panel, although its's default one is working on button click. Suppose I ...
1 vote
0 answers
379 views
How do I get the expandable image from StatusBarNotification?
I am trying to get all the information from a StatusBarNotification (sbn). I've already set up the NotificationListenerService. I was able to get EXTRA_TITLE, EXTRA_TEXT and EXTRA_LARGE_ICON. But I ...
4 votes
0 answers
657 views
Android 11 device Not showing badge count
I am showing an android app to show the badge count on the app launcher icon. Tried in a different version but it's not working on Android 11. May I know, is there anything new API for the same on ...
3 votes
2 answers
1k views
How to access the Push Notification counter on Android (TV)?
I would like to access the number of currently available push notifications The following :, here on a Android TV emulator image.. So how can I read that number? EDIT: I do not want to set anything.
0 votes
1 answer
322 views
Having Exoplayer controls in both layout and notification bar?
I'm building a podcast player using the Exoplayer. I've managed to set it up to have the controls both in the layout and the notification bar using exoplayer's PlayerNotificationManager. The problem ...
1 vote
1 answer
55 views
Why do notifications on Oreo not display unless an icon is set
Is this a platform bug or some problem in my implementation? It appears to be regardless of importance level. Version of Android is 8.1.0. Target SDK is 22 (I am stuck on that unfortunately). ...
2 votes
2 answers
3k views
How to create Custom Notification Icons that support both Light and Dark theme in Android
In my application I used icons in custom notification. The icons' color is black. It works fine in light mode, but NOT in dark. The icons are made by vector graphics in Android. The problem with ...
2 votes
1 answer
1k views
Show video, gif or banner in push notificaion
I have come across the notification which actively changes the content like banners. AFAIK videos and GIFs are not supported in the notification. How can we achieve this? I have searched and found ...