[Android] Application Foreground / Background events not called

application_foreground and application_background events are not firing even when I put the app on either state.

Tracker.TrackerBuilder(emitter, context.packageName, context.packageName, context)
                .level(LogLevel.VERBOSE)
                .platform(DevicePlatforms.Mobile)
                .sessionContext(true)
                .mobileContext(true)
                .lifecycleEvents(true)
                .screenContext(true)
                .installTracking(true)
                .applicationContext(true)
                .subject(subject)
                .base64(true)
                .backgroundTimeout(90)
                .foregroundTimeout(600)
                .build()

Tracker is configured on a class extension of Application.
I’m using SDK Version: 1.3.0

Hi @teffi ,

We’ve been using both events as expected so far but I’ll try to reproduce using your snippet and let you know how it goes.

Thanks.

1 Like

Update:

It appears that we are missing the android lifecycle extension gradle.

androidx.lifecycle:lifecycle-extensions:2.1.0