I am using notification manager to display notifications on the android-Notification bar. But my requirement is, clear the notifications count from the android notification area after 2minutes. Is this possible in android. if possible please give me some sample code. It would help me to move forward.
Thanks,
Ganesh.
Related
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.
My requirement is very simple. I have configured react-native-firebase properly. I am getting notification as required. But my requirement is, I have bell icon in my app I want to count all the notifications coming (can be in foreground, can be in background or can be when app is killed) I want to show that count on the bell icon. When user will click on icon I will then make it to null. Now I want to know how I can achieve as above. Please help me out, any help will be appreciated. Thanks in advance.
This is the first time I am integrating notifications into my application. I am using Firebase. Setup was extremely simple and I am able to view the notification in the tray.
So, when the application is open, and if it receives a notification. I would like to display the notification in the activity itself.
How should I go about this?
You can look at Gmail approach. If there is new mail in current thread, they show SnackBar with notification.
You need to determinate connected parts of your app. And if notification connected to part where current user is - show SnackBar, and if there is something completely different - show heads-up notification.
Guide how to do Heads-Up notifications here
Guide how to do SnackBar notifications here
Have you ever tried Pushbots , its an infra- Structure for Notifications , it has more interesting Features than Firebase. Give it a shot.
Pushbots link
I am displaying multiple notifications using different ids to the notification. But I am unable to get clicked notification information in other activity. Please help me with some example. Thank you.
Status Bar Notification feature displays a persistent notification on the status bar of your Android device. This notification can be dismissed when the user has read it, and thus this makes it a good tool for delivering notifications to the users to respond at their convenience
The link that follows may help you
https://mobiforge.com/design-development/displaying-status-bar-notifications-android
I am working in application that contain lost of push notifications, in each push notification , i have to put play icon to play the music of each notification. problem when i am updating the notification means play to pause or pause to play. than notification update but the notification goes on the top each time.
I want to know , is there way to stay notification on there place after notification update ?
I show some image, to explain briefly.
Please help me thanks in advance.
You can use the setpriority to set the priority of the notification..
Check this post for more info
The method setPriority (int) is undefined for the type Notification