Skip to content

Instantly share code, notes, and snippets.

@adityaladwa
Created November 19, 2017 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adityaladwa/899fd74d6342b3f7a3dab83c168c1924 to your computer and use it in GitHub Desktop.
Save adityaladwa/899fd74d6342b3f7a3dab83c168c1924 to your computer and use it in GitHub Desktop.
viewModel.login()
.subscribeWith(new DisposableSingleObserver<Result>() {
@Override
public void onSuccess(Result result) {
//Handle Success
}
@Override
public void onError(Throwable e) {
if (e instanceof NetworkInterceptor.NoNetworkException) {
//Handle Network error
}
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment