Skip to content

Instantly share code, notes, and snippets.

@intari

intari/service.java

Last active Oct 31, 2017
Embed
What would you like to do?
protected var locationServiceConnection: ServiceConnection = object : ServiceConnection {
override fun onServiceConnected(className: ComponentName, service: IBinder) {
// This is called when the connection with the service has been
// established, giving us the service object we can use to
// interact with the service. Because we have bound to a explicit
// service that we know is running in our own process, we can
// cast its IBinder to a concrete class and directly access it.
//locationService=(MySLocationService.LocalBinder)service;
locationService = (service as MyLocationService.LocalBinder).service
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.