Backgrounding app artificially inflates session duration by value of SESSION_DURATION
The way that the app state change is handled, it fires a session_stop event when backgrounding the app, if you bring the app to the foreground it sends a subsequent session_start event.
If you do this during the time defined in SESSION_DURATION (default: 60 seconds), it seems like the count.ly servers consider this the same session (this is good). However when viewing the dashboard I observer the session_stop event has increased the "duration" of the session by 60 seconds.
I guess you can see where I am going here, and this may be only an issue with the UI of count.ly rather than this SDK. If I sit there and constantly background and foreground the app my session duration goes through the roof.
Example: I took this screenshot at 15:38 however the session started at 15:37 is already 17 minutes long.

Hi Gorkem,
Can you add Artem in this thread? As this issue is partially related to the SDK. and partially with server background.
@gorkem-cetin
Thanks
Sure.. @iartem what do you think?
@trinisofttechnologies it's not related to the server whatsoever. React SDK doesn't even calculate the time spent in the foreground, it just always sends session interval as duration (default value is 60 seconds). Even on end_session irrespective the moment it is called. https://github.com/Countly/countly-sdk-react-native/blob/master/Countly.js#L395
Ok will continue to review on this.