Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 92194f3

Browse files
authored
fix: re-add logic for tracking lifecycle events (segmentio#328)
1 parent fb34044 commit 92194f3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/core/android/src/main/java/com/segment/analytics/reactnative/core/RNAnalyticsModule.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ class RNAnalyticsModule(context: ReactApplicationContext): ReactContextBaseJavaM
207207
return promise.reject("E_SEGMENT_ERROR", e)
208208
}
209209

210+
// This is invoking the logic used to track lifecycle events when a RN app goes through a cold-boot
211+
// This logic should not be deleted
212+
if (options.getBoolean("trackAppLifecycleEvents")) {
213+
this.trackApplicationLifecycleEvents(writeKey)
214+
}
215+
210216
RNAnalytics.setupCallbacks(analytics)
211217

212218
singletonJsonConfig = json

0 commit comments

Comments
 (0)