Skip to content

Commit

Permalink
log flushing events in onStop
Browse files Browse the repository at this point in the history
  • Loading branch information
wzieba committed Nov 1, 2023
1 parent 817f5fd commit 3b535ca
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ protected ParselyTracker(String siteId, int flushInterval, Context c) {
ProcessLifecycleOwner.get().getLifecycle().addObserver(
(LifecycleEventObserver) (lifecycleOwner, event) -> {
if (event == Lifecycle.Event.ON_STOP) {
PLog("App is in ON_STOP. Flushing events.");
flushEvents();
}
}
Expand Down

0 comments on commit 3b535ca

Please sign in to comment.