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.
Related
Actually the thing I want to achieve is, normally the shortcut icon badge count in android got cleared once the push notification popup is acknowledged by an user from notification panel, but instead clearing the count as above it has to be cleared only after the corresponding notification is acknowledged by an user within the app(for eg: if an user received a text message then the badge count will increased to one and once the user cleared the push notification popup form notification panel then the badge will also got cleared, but instead of that badge should be cleared only after the user viewed the message).
I tried the following packages.
https://www.npmjs.com/package/react-native-app-badge
https://www.npmjs.com/package/react-native-android-badge
Looks like you can use ShortcutBadge.setCount(0); to clear the badge counter!
I dont know what you use to display a notification on the android device itself, probably react-native-push-notification.
If that's the case, they also have a function for it:
PushNotification.setApplicationIconBadgeNumber(0)
You just need to run one of these functions when the event of a dismissed notification triggers, which may or may not need some java coding for achieve it!
I'm developing an app in Flutter and using Firebase to send Push Notifications, the phone is receiving them but the issue is that I wan't to display a little retancle with some text inside such as WhatsApp does when you receive a new message, but mines just go for the top of the notifications bar and doesn't show anything. Does anyone know how to proceed or how is called the component that I need to implement?
Expected result:
Thank you!!
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
I am making NotificationManager. I have created datepicker when notification has to appear.
Next thing I need is time. I have learned everything about TimePickers, but can someone show me an example how to set time for notification?
Maybe this will help. It's the source code of this open source app. This is maybe a good example for your notification.
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.