I'm Navis, I come from VietNamese and I'm a newbie in android developer.
When i make an application i have a problem with Notification in android.
I used C2DM service to integrate push messages for my app. And when receive message from C2DM server, i want my app show information in notification separated. 1 message show in 1 notification. But when i test app, i push message to my android devices, it only show 1 notification. For example, i push 3 message (1, 2, 3). App will display 1 the same position (only update content). So, how can i display in 3 notification separated?
Thanks for your help!
My guess is that you are passing the same id to notify api.
Change the ID to different one to show different notifications instead of replacing
mNotificationManager.notify(_ID, notification);
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.
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.
I am trying to figure out how Facebook / Twitter sends push notifications like "You have 20 new followers"I don't know how to call it but i want to learn the underlying algorithm of this in Android. Please help, Thanks !
On Android you can execute your code before actually showing a push notification. They could simply send a push notification to all devices with an identifier, then the app can make a request to the server and get the needed information in order to show the push notification.
They can also send one push notification per device, as they can associate the push notification key with the user login, and the server would fire a push notification every time there is an event that demands a push notification.
But there are also other ways of doing this, for example, they can, for example run locally in background and create a local notification when the app decides it is necessary.
I have implemented push notifications via PushApps.
My requirement is that, if user get multiple notifications then i need to show as a single notification with number of notifications counts.
PushManager.getInstance(getApplicationContext()).setShouldStackNotifications(false);
Grouping is working fine with above line but number of notification count are not displaying.
Please suggest me something.
Thanks.
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