How do I bing a service with kotlin `bindService` ...
# android
j
How do I bing a service with kotlin
bindService
doesn't work. Whats the kotlin equivalent?
Copy code
private fun initiateNokeService() {
    val nokeServiceIntent = Intent(this.user.context, NokeDeviceManagerService::class.java)
    bindService(nokeServiceIntent, mServiceConnection, Context.BIND_AUTO_CREATE)
}
thats the function I'm trying to implement but can't seem to figure out how to bind the service
In order to use
bindService
you need to grab it from
context.bindService