koin-android / org.koin.android.scope / ScopeService

ScopeService

abstract class ScopeService : Service, AndroidScopeComponent

ScopeService

Service component, allow to create & destroy tied Koin scope

Author
Arnaud Giuliani

Constructors

<init>

ScopeService

ScopeService(initialiseScope: Boolean = true)

Properties

scope

open val scope: Scope

Functions

onCreate

open fun onCreate(): Unit

onDestroy

open fun onDestroy(): Unit

Extension Functions

getOrCreateScope

fun <T : ComponentCallbacks> T.getOrCreateScope(): Lazy<Scope>

newScope

fun <T : ComponentCallbacks> T.newScope(): Lazy<Scope>