Created
September 27, 2017 14:49
-
-
Save husaynhakeem/8585f040f35628733790825a67b83b32 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
public void populateDB() { | |
Completable.fromAction(() -> PokemonDataBase.getInstance(context).pokemonDao().insert(pokemonList())) | |
.subscribeOn(Schedulers.io()) | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribe(this::onDBPopulationSuccess, this::onDBPopulationFailure); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment