Firebase push notification is not working properly when device is offline - android

I am implement a tap action on the notification and then i found out that when i am offline and triggering the notification. and when i am coming to online i am only receiving the last notification. and it is only happening in android
please help
I have read lot of solution but did not found any proper answer.

I assume you've read this then. Check notification's time to live first, and if you're sure that's not the cause, make sure you're using different notification ids for notifications, otherwise you'll replace the currently shown notification with a new one.

Answered a similar post here. This is working as intended as notification messages are always collapsible.

Related

Android Cancel Notification From Backend

I noticed that some app like messenger clear their notification in phone even I viewed the message from web.I know it can be done by giving ID to notification when showing it and when it needs to be cleared we can send another event via FCM and clear the corresponding notification. Is there a proper way of doing it other than sending another event via FCM because it feels not the proper way of doing it for me.
I hope it will helpful Can you expire / remove a message remotely on FCM?.
Note: due to low reputation I had to use answer section instead of comments.

About Notification for Missed Call in android

I am using voip sip for calling processing calls when Push-Notification received. I want to create top bar notification for missed call . I am already processing calls when Push-Notification receives. I already searched lot of things but nothing helped me.
My question is, i'm making calls after receiving Push-Notification, so likewise i want to display notification after receiving Push Notification, so for that how do I differentiate for which i am receiving Push-Notification.
The notification you are receiving it always contains extra information, all you have to do in compare both notification packets and identify the key using which you can differentiate both of notification. If you are not able to find such key ask API developer to provide it.
You can get something unique in notification response for deffrentiate means notifications you are getting extra data please check in notification response or check in voip sip's documentation (if not getting this extra information ask api developer to provide it) using it you can identify whether you are receiving missed call notification or call notification.
Hope this may helps you.
https://developer.android.com/reference/android/provider/CallLog.Calls.html#DURATION
Call duration == 0, so call was missed

How to get all notification of all application have custom notification running

I'm a beginner. I have a problem about custom notification.
I want to read all information of normal notification and custom notification use RemoteView.
Example I want get all information about notification music(art cover, song, next, pause, back action)
I search very very much, but can't find the document I need.
If you know, please tell me.
Thank so much!
What you're looking for is a NotificationListenerService. From the docs:
A service that receives calls from the system when new notifications are posted or removed, or their ranking changed.
If you're specifically looking for ways to read Metadata and the music app is using a MediaSessionCompat, you can use MediaControllerCompat.getMetadata() to read the data off of the notification.
To display the actual content of the notification in your app, what you can do is get one of the many RemoteViews from the Notification object you received, then use this answer to display your notification.

Pushwoosh Android notification is replaced when new come

I am using pushwoosh to send notification from server to devices. And that is working without any problems. Also it is worth mentioning that I am using phonegap/cordova. This problem is only related for android, ios does not has this problem.
Problem is when I send few notifications in short time only one is displayed in android notification area. On notification handle in my code all notification are received. Notifications do not have same title or text.
You need to enable multi-notifications for Android. Look for "setMultiNotificationsMode" here:
https://github.com/Pushwoosh/pushwoosh-android-sdk/blob/master/Documentation/PushManager.md#setmultinotificationmode
You need to enable multi-notifications for Android.
PushManager.setMultiNotificationMode(context);

Is it possible to suppress notifications in Android?

I'd like to be able to listen for notifications being sent to the status bar, and intercept and suppress (temporarily) those notifications.
I've seen AccessabilityEvent.TYPE_NOTIFICATION_STATE_CHANGED, and NotificationListenerService.
However, I just don't want to be informed when a notification is displayed, I want to prevent the notification from being displayed.
I can see how this could potentially be a security threat, so I can understand if it's not possible. Is this possible? If so, how would I go about doing it?
I think you're on the right track with the NotificationListenerService. Google has made these API's available from Android 4.3 on, so an application using this method would just be available for new devices.
In the following blogpost you can find an example of what you can do with the NotificationListenerService: http://weimenglee.blogspot.ch/2014/03/android-tip-notification-listener.html
The basic idea is to implement the onNotificationPosted() method, which gives you a StatusBarNotification instance. You should then be able to cancel the notification with this.cancelNotification(
notif.getPackageName(),
notif.getTag(),
notif.getId());
See the blogpost for a further description of what to extend and how to implement the methods.
Hope this helps.

Categories

Resources