clevertap-react-native icon indicating copy to clipboard operation
clevertap-react-native copied to clipboard

How to detect that inbox is closed?

Open vvscode opened this issue 4 years ago • 3 comments

In my app I do show something like Inbox (5) where 5 is number of unread messages which I do receive with getInboxMessageUnreadCount.

When user opens inbox that number can be changed (as soon as he read the messages). How can I detect, that inbox was closed and users is returned back to my app? Do not see any related API

vvscode avatar Nov 24 '21 12:11 vvscode

@vvscode Are you trying this on Android or iOS? In Android, you can write your own ActivityLifecycle callback which will give you a callback whenever an Activity is created/finished. You can then update the count there. We do not provide any callback on the Activity being closed.

darshanclevertap avatar Jan 31 '22 11:01 darshanclevertap

i need it for both

vvscode avatar Feb 15 '22 08:02 vvscode

@vvscode Really sorry, we do not have any callback for the Activity being closed right now. We will be taking up this request into our roadmap. As a workaround, you can compute the unread message count every time your Inbox UI component is getting rendered on the screen using our getInboxMessageUnreadCount method

darshanclevertap avatar Feb 15 '22 08:02 darshanclevertap