You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically title, the default value is false, when would/should I set it to true? I want to track application lifecycle events so I'm setting trackApplicationLifecycleEvents to true but I don't know what's the significance of useLifecycleObserver. The documentation just says enables the use of LifecycleObserver to track Application lifecycle events but it doesn't explain what I should consider when enabling this flag
The text was updated successfully, but these errors were encountered:
hi @lwasyl, trackApplicationLifecycleEvents = true tracks lifecycle events regardless the value of useLifecycleObserver, though in different ways. if useLifecycleObserver = false, lifecycle events are tracked via the old android lifecycle hooks ActivityLifecycleCallbacks. otherwise, lifecycle events are tracked via DefaultLifecycleObserver
for example, on activity created, if useLifecycleObserver = false, the sdk calls to the override method onCreated from DefaultLifecycleObserver explicitly to track lifecycle events. however, if useLifecycleObserver = true, onCreated is invoked by the lifecycle observer automatically. the end results are the same. choose the value that fits your use case.
Hi, thanks but that doesn't really answer my question - what would be my use case for using one or the other? As a library consumer I still don't know if I should change the default or not. If both options work the same, why have it configurable in the first place?
if you already use lifecycle observer in your app, you can set useLifecycleObserver = true, but you don't have to. this flag is designed for the apps that did not implement lifecycle observer.
Basically title, the default value is
false
, when would/should I set it totrue
? I want to track application lifecycle events so I'm settingtrackApplicationLifecycleEvents
totrue
but I don't know what's the significance ofuseLifecycleObserver
. The documentation just saysenables the use of LifecycleObserver to track Application lifecycle events
but it doesn't explain what I should consider when enabling this flagThe text was updated successfully, but these errors were encountered: