How to get the number of unread messages from Quickblox? - quickblox

The BE has to send a push notification with a field ios_badge where we need to have a number of unread messages. How should we do it on the BE?
We need to place that number on top of the IOS app icon.

Related

ArrowDB - how to get event listener of a chat sent to group?

I'm developing a real time chat app using Titanium Appcelerator. I have everything working with ArrowDB and one user can send another user a message through a group.
https://docs.appcelerator.com/arrowdb/latest/#!/api/Chats
However there doesn't seem to be a method or listener to identify when a new message has been sent to the group.
What I'd like to see is when the other user is typing, and as soon as the message is sent it bubbles up on the recipients chat window. Exactly like how iMessage works.
The only way I can pull new messages from the group to the local users device is to have a refresh button or to use a setInterval with a function call to refresh the messages.
obviously this is not a great way to handle the situation as with a few hundred users every month this would make for hundreds of thousands of api calls and probably not good for device performance.
Does anyone have any ideas how to get real time chat working? Is there a method or event listener I am missing that isn't document?
Push notifications only work while the app is in the background, so this is not an option unfortunately.

Ionic 4 Firebase Pushnotification

I need to know is it possible to need to send some type ID with firebase notification. Where user get notification i want to open the page and pass that ID as a parameter in api ? Is it possible ? OR any one have example ? Thanks
Depending on your need you can send a notification message, or data message, the notification message will be basically responsible for showing a push notification to the device with a title, subtitle and message depending on the operating system (in terms of the graphic environment), the data message will send a notification to the device with the data you want, this notification will not be visible to the user, now if you need to send data but also show a notification to the user you can do it in two ways:
You send a notification of data, when you receive it you process it, you show a local notification and you send by parameter the id that you received.
Send a push notification (with the id specifically in some side as you wish) this is shown by default to the user, when the user opens it, you process the id, and send it by parameter.
I recommend the first option, here you will find more information
Firebase Cloud Messaging

Change notification text in Notification Center

i am developing an iOS app which receive push notification from GCM server. I need to change the message received from push notification server to "You have received n notification" where n will be number of notification received from push server.
Is there is a way to perform this action?
If yes, then how should i do it?
The short answer is yes, but you must maintain the count of unopened notifications yourself. You could have your app send a HTTP request to your server when the app opens, to set to zero the message count on your server, which will increment with each new message till the app is opened and the value is reset. So when you send a new message you can include the incremented value in the message.

How to update a Parse push notification instead of creating a new one

With my app, the Parse module sends out a notification each time a picture is sent to the Android recipient. The recipient then know to login to the app and receive the picture. My problem is that if the same recipient is getting many pictures sent to him, he will get many notifications for the app. Is there a way to update any existing Parse notification on and Android device to show the waiting count, instead of sending multiple notifications? I have searched through Parse documentation and here at Stackoverflow but can't find any info on how to do this.
yes, I am facing the same problem, The resolution is that , if you dont send title and alert in parse notifications, it will not create the automatic notifications in the device, so you will have to handle them in your broadcast receiver and create your own notifications, you can have a NOTIFICATION_ID for each notification you create and update the count by getNumber and setNumber i think.
here is a link
https://www.parse.com/questions/update-notification-in-android
Update: Sorry for getting back to you late on this but this might help someone else. Even If your app is not running, You will still get the notification. I have tested it on my own BroadcastReceiver which generates Modified notifications with bitmap, and positive, negetive button for response.

Updating application icon Badge in iPhone 3.0, when application is not running

I have an application, which lists number of IM sent by any of my friend using my application. And application icon show number of unread IMs to me. If my application is running in foreground, I can update badge by calling web service every 1 minute which will return number of unread IMs. Suppose, if the person is using iPhone3.0 and application is not running, how can i update the badge? Push notification without alert, but with just number of unread IMs as badge number will work?
Please advice, Thank you.
Yes if the user enables push notifications and allowes it for your app then you can use them to just adjust the badge counter.
At last, we found the problem, the problem is passing badge parameter as string in JSON payload, Now we are sending it as number, so even when the application is in background, badge getting set properly.
Thank you for your all help.