It's my first time trying to create a scoped defin...
# koin
y
It's my first time trying to create a scoped definition, I am creating the scope then retrieving the components inside of the scope, but for some reason, I get No definition found for type 'quran.webrtc.WebRtcSessionManager'. Check your Modules configuration error (edited) details are in thread
I have created this scoped definition in my Module
Copy code
scope<WebRtcSessionManager> {
    scoped<WebRtcSessionManager> {
        AndroidWebRtcSessionManagerImpl()
    }
}
and WebRtcSessionManager is an interface that looks like this
Copy code
interface WebRtcSessionManager: KoinScopeComponent {
    fun closeTheScope()
    //...
}
and in my AndroidWebRtcSessionManagerImpl I am creating a scope there
Copy code
class AndroidWebRtcSessionManagerImpl(
) : WebRtcSessionManager {
    override val scope: Scope = createScope()  
   //...
}
then in my viewModel I am creating a scope and then getting my component like this
Copy code
private val scopeSessionManager = getKoin().getOrCreateScope<WebRtcSessionManager>(uuid4().toString())
 val sessionManager = scopeSessionManager.get<WebRtcSessionManager>()
what i am doing is that i am creating or getting a scope doesn't matter to me inside a videModel that presists through the entire lifecycle of the app, and then in a specific case when a user quit a certain screen what I do is that I close the scope, then when ever the user get back to that screen since there is no scope it will create one