Skip to content

Instantly share code, notes, and snippets.

@mitchtabian
Last active January 22, 2021 01:00
Show Gist options
  • Select an option

  • Save mitchtabian/766d274f592b5b692ed79c16920cb038 to your computer and use it in GitHub Desktop.

Select an option

Save mitchtabian/766d274f592b5b692ed79c16920cb038 to your computer and use it in GitHub Desktop.

Revisions

  1. mitchtabian revised this gist Mar 14, 2019. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Subscribe.java
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,8 @@ public void onSubscribe(Disposable d) {

    }
    @Override
    public void onNext(Task task) {
    public void onNext(Task task) { // run on main thread

    Log.d(TAG, "onNext: : " + task.getDescription());
    }
    @Override
  2. mitchtabian revised this gist Mar 14, 2019. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions Subscribe.java
    Original file line number Diff line number Diff line change
    @@ -3,17 +3,14 @@
    public void onSubscribe(Disposable d) {

    }

    @Override
    public void onNext(Task task) {
    Log.d(TAG, "onNext: : " + task.getDescription());
    }

    @Override
    public void onError(Throwable e) {

    }

    @Override
    public void onComplete() {

  3. mitchtabian created this gist Mar 14, 2019.
    21 changes: 21 additions & 0 deletions Subscribe.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    taskObservable.subscribe(new Observer<Task>() {
    @Override
    public void onSubscribe(Disposable d) {

    }

    @Override
    public void onNext(Task task) {
    Log.d(TAG, "onNext: : " + task.getDescription());
    }

    @Override
    public void onError(Throwable e) {

    }

    @Override
    public void onComplete() {

    }
    });