Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Twilio chat, how set sum of chats to notification _bageCount

$
0
0

Short description: I get push notification from twilio chat. But in my app I use 4 different chats (channels). So when I get field "bage" from notification it just show count of chats with new messages, but not amount of messages.

How can I get the sum of unread messages from all chats?


More info:

  • I use react-native 0.61.2 but I write native code too;
  • During the work I have used this tutorial TwilioChatReactNative;
  • For indicate unreaded messages I use Message Consumption Horizon;
  • The way of connection to chat (only react part) the close to this Connect to chat;
  • In theory I can get set bage himself, but for me this function don't work in background;

    PushNotificationIOS.setApplicationIconBadgeNumber

  • Also I have tried to use this library react-native-notification but it didn't help too.
  • I subscribe to pushNotification with this method

    client.setPushRegistrationId('apn', token);

  • When I use twilio notify and set "bage" by hand all work good, but notification from chat twilio do by himself.

Summary: I need one decision from this list (or something else, I open for offers):

  • Say twilio send me sum of unread messages from all chats;
  • Way how update "bage" from background;
  • New way of subscribing to channels to get the sum of messages in "bage".

Thanks to everyone who will respond


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>