Skip to content

Instantly share code, notes, and snippets.

@madsunrise
Created July 12, 2018 11:42
Show Gist options
  • Select an option

  • Save madsunrise/f62bc4e6e06cc6c7e41081d4f8fe081c to your computer and use it in GitHub Desktop.

Select an option

Save madsunrise/f62bc4e6e06cc6c7e41081d4f8fe081c to your computer and use it in GitHub Desktop.
Single.fromEmitter(new Action1<SingleEmitter<KKMStatus>>() {
@Override
public void call(final SingleEmitter<KKMStatus> emitter) {
kkMv2.getStatus(new KKMCallbackWithResult<KKMStatus>() {
@Override
public void onSuccess(KKMStatus result) {
emitter.onSuccess(result);
}
@Override
public void onError(String reason) {
emitter.onError(new Throwable(reason));
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment