Skip to content

Instantly share code, notes, and snippets.

@tunitowen
Created May 19, 2017 09:09
Show Gist options
  • Save tunitowen/908d08f44167ab53314bdf23b4c7b107 to your computer and use it in GitHub Desktop.
Save tunitowen/908d08f44167ab53314bdf23b4c7b107 to your computer and use it in GitHub Desktop.
Room-GettingStarted-GetData
fun registerAllPersonListener() {
MyApp.database?.personDao()?.getAllPeople()
?.subscribeOn(Schedulers.io())
?.observeOn(AndroidSchedulers.mainThread())
?.subscribe { listOfPeople ->
view.personTableUpdated(listOfPeople)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment