Skip to content

Instantly share code, notes, and snippets.

@pyeongho
Created January 25, 2017 01:26
Show Gist options
  • Save pyeongho/5f26d740c163dc622d8ae1e0e8b71573 to your computer and use it in GitHub Desktop.
Save pyeongho/5f26d740c163dc622d8ae1e0e8b71573 to your computer and use it in GitHub Desktop.
private Observable<List<ApiUser>> getObservable() {
return Observable.create(new ObservableOnSubscribe<List<ApiUser>>() {
@Override
public void subscribe(ObservableEmitter<List<ApiUser>> e) throws Exception {
if (!e.isDisposed()) {
e.onNext(Utils.getApiUserList());
e.onComplete();
}
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment