IviApplicationExtension

@IviExperimental(reasons = [])
abstract class IviApplicationExtension(extensionContext: IviApplicationExtensionContext)

Extensions to the IviApplication.

Note: Extensions share the same lifecycle as the Android (sub) Application class. They are created at startup of each process that is started for the application and remain alive as long as the process is alive. Android processes can remain alive even if the process is not used any longer for any component, but they also can be killed at any time. Therefore, application extensions are glorified singletons. As singletons are considered a design anti-pattern, implementing an application extension is a last resort solution and should be avoided if possible. Compared to a singleton, the only benefit of application extensions is that tests can reset the configured application extensions in between tests, without the test framework having to know all extensions. This helps in making sure that one test case is not affecting another one.

Parameters

extensionContext

The context of the application extension to communicate with the rest of the system.

Inheritors

Constructors

Link copied to clipboard
constructor(extensionContext: IviApplicationExtensionContext)

Types

Link copied to clipboard
sealed class IdleState

Indicate if the application extension is idle or not.

Properties

Link copied to clipboard

Indicates if the application extension is idle or not.

Link copied to clipboard

If true, the application extension is only created in the main process of the application. If false, the application extension is created in all processes that are started for the application.

Functions

Link copied to clipboard
@VisibleForTesting(otherwise = 3)
fun invokeOnCreate()

Invokes onCreate.

Link copied to clipboard
Link copied to clipboard