File tree 1 file changed +11
-1
lines changed
android/src/main/java/com/amplitude/android
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import com.amplitude.core.events.BaseEvent
15
15
import com.amplitude.core.platform.plugins.AmplitudeDestination
16
16
import com.amplitude.core.platform.plugins.GetAmpliExtrasPlugin
17
17
import com.amplitude.id.IdentityConfiguration
18
+ import kotlinx.coroutines.Deferred
18
19
import kotlinx.coroutines.launch
19
20
20
21
open class Amplitude (
@@ -27,7 +28,16 @@ open class Amplitude(
27
28
return (timeline as Timeline ).sessionId
28
29
}
29
30
30
- private val activityLifecycleCallbacks = ActivityLifecycleObserver ()
31
+ private lateinit var activityLifecycleCallbacks: ActivityLifecycleObserver
32
+
33
+ /* *
34
+ * This build call is initiated by parent class and happens before this class
35
+ * init block
36
+ */
37
+ override fun build (): Deferred <Boolean > {
38
+ activityLifecycleCallbacks = ActivityLifecycleObserver ()
39
+ return super .build()
40
+ }
31
41
32
42
init {
33
43
registerShutdownHook()
You can’t perform that action at this time.
0 commit comments