Created
November 21, 2017 17:53
-
-
Save dcalance/1407cd1721ca44c544e4b34e3d66a0da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val mConnection : ServiceConnection = object : ServiceConnection { | |
override fun onServiceConnected(className : ComponentName?, service : IBinder?) { | |
// We've bound to LocalService, cast the IBinder and get LocalService instance | |
val binder = service as DeserializeService.LocalBinder | |
mService = binder.getService() | |
mBound = true | |
appList = ArrayList(mService!!.getResult().asList()) | |
list.adapter = listAdapter | |
updateAdapter() | |
} | |
override fun onServiceDisconnected(name: ComponentName?) { | |
mBound = false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment