I am having a problem while I am open app on another screen the push notification of sendbird is not sent , I need to update the message count of my messages in sendbird , how can I do that ?
Please Check point 4 in this link answer in sendBird help center the question Why am I not receiving push notifications?
.
It says :
A user must be offline - they must be disconnected from ALL devices.
So when the app in the foreground that mean the sendBird user is online and the way they implement it that they don't send notification for the online users which is disappointing to know.
I agree with #Nawaf. I should add if it works for anyone:
Keep unread message count as 1 or coloured dot on your notification badge inside app, when you get SendBird notification on your launcher activity intent. Hide the dot when user clicks the badge.
Related
I am using firebase for notification. I want to send notification to the group of users... If any one of them press accept notification action button then, the same notification must be remove from the other users device. Is it possible to do using firebase.
Ex. I want to send notification to 5 delivery boys for collecting parcel from XYZ place, if any of them accept the collecting parcel order notification then the same notification must be remove from other 4 delivery boys autometically.
I study and practically done an example of https://firebase.google.com/docs/cloud-messaging/android/device-group Notification send to all 5 del. boys but notification still there after accepting the collecting order.
Please, help.
Firebase Cloud Messaging has two distinct types of messages:
Notification messages that are handled and displayed by the OS when the app is not active, and handled by your application code when the app is active.
Data messages that are always handled by your application code, which can then choose to display or update UI notifications as needed.
What you're describing sounds like you want to use data messages only, and then use Android's notification UI/API to display, update, or hide a notification.
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
Here is the example case I'm curious about:
let's say, 2 people chat using Whatsapp, Mike and Andy.
While Mike is waiting for Andy to reply his chat, he close his chat room with Andy, and goes to another chat room, with Tom.
While Mike is texting Tom, Andy is sending the reply, then, what happen in Mike's phone is a push notification appear (you got a message from Andy).
But if Andy send the reply while Mike is still on the chat screen with Andy, the message won't come as a push notification, but as a real time message.
So, how do Whatsapp handle this condition? it's like the push notification know in which Screen is Mike currenly in.
Push message is caught by application before it is shown to the user and if the user isn't the good, I suppose app send notification (and it appears to user).
I dont Know if that helps u but in my chat application every chat has an id when the class chat is called ( When user opens a chat) and saves his current Id in a static variable when a new message comes in it checks wether this variable equals the chatid the message was Send to if it does itll use a broadcast to add another message to the chatview if not it sends a notification.
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
Hi i wish to implement push notification in my own android application. how can i do? please give me some ideas....
This kind of broadcast receivers should receive messages even if my app is closed(like Gmail.here i receive one new message in my inbox means that time the notification message is displayed on top of my android device,clicked that notification message means directly go to inbox and view that message).
here i wish to insert one data on my database means the notification message is display on my android app even my app is closed.
Please see http://developer.android.com/guide/google/gcm/index.html. You need to implement GCM.
EDIT:
To get notification even if app is in background, see Android GCM (push notification): device doesn't receive notification if application is stopped.
See Android GCM basic implementation, http://developer.android.com/guide/google/gcm/demo.html & How to setup Google Cloud Messaging for Android?
see http://developer.android.com/guide/google/gcm/index.html for detaily. There you find a tutorial and all the basic stuff