0
votes

I have read both the Android and iOS SDK documentation for integrating push notifications into my chat implementation. One topic that I do not see discussed is how to navigate to the correct place in an application when a push notification is tapped on.

For instance when a use taps on a push notification how does an app respond to the event in order to navigate to the view of the channel that received the message?

1

1 Answers

0
votes

The documentation Push Notifications on iOS do not reference it but digging into the iOS SDK I found TwilioChatClientDelegate Protocol Reference. It has a delegate that does what I was looking for:

– chatClient:notificationNewMessageReceivedForChannelSid:messageIndex:
– chatClient:notificationAddedToChannelWithSid:
– chatClient:notificationInvitedToChannelWithSid:
– chatClient:notificationRemovedFromChannelWithSid:
– chatClient:notificationUpdatedBadgeCount:

For Android there is com.twilio.chat.NotificationPayload Class Reference which has methods for parsing out the data from the notification payload.