Package 

Object ApplicationService.Companion

    • Method Detail

      • getInstance

         final ApplicationService getInstance()

        Process-wide instance shared between ActivityLifecycleInitializer (which registers lifecycle observation at process start) and dependency injection (which resolves the service later, during SDK init). Both must reference the same object so the activity lifecycle observed before init is visible to the running SDK.

      • getInstanceOrNull

         final ApplicationService getInstanceOrNull()

        The process-wide instance only if ActivityLifecycleInitializer already created one; never creates it. Dependency injection uses this so that when the startup initializer did not run (its provider was disabled, or unit tests), each SDK init gets its own instance rather than a leaked process-wide one.