Skip to content

Commit 9b8cd36

Browse files
feat: save user props before session calls
1 parent e442f6f commit 9b8cd36

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sdk/src/main/java/ly/count/android/sdk/ModuleSessions.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ void beginSessionInternal() {
6060
String preparedMetrics = deviceInfo.getMetrics(_cly.context_, metricOverride, L);
6161
sessionRunning = true;
6262
prevSessionDurationStartTime_ = System.currentTimeMillis();
63+
_cly.moduleUserProfile.saveInternal();
64+
6365
requestQueueProvider.beginSession(_cly.moduleLocation.locationDisabled, _cly.moduleLocation.locationCountryCode, _cly.moduleLocation.locationCity, _cly.moduleLocation.locationGpsCoordinates, _cly.moduleLocation.locationIpAddress, preparedMetrics);
6466

6567
if (_cly.moduleViews.trackOrientationChanges) {
@@ -85,6 +87,8 @@ void updateSessionInternal() {
8587
}
8688

8789
if (!_cly.disableUpdateSessionRequests_) {
90+
_cly.moduleUserProfile.saveInternal();
91+
8892
requestQueueProvider.updateSession(roundedSecondsSinceLastSessionDurationUpdate());
8993
}
9094
}

0 commit comments

Comments
 (0)