Observable which does not pass anything in onNext()

前端 未结 6 944
猫巷女王i
猫巷女王i 2021-02-02 06:52

I would need an Observable, for example to provide a system clock, which does not need to pass anything in onNext(). I couldn\'t find a signature that would allow me to do that.

6条回答
  •  别跟我提以往
    2021-02-02 07:23

    One of the light solutions is to use Observable

    And then onNext(Boolean.TRUE) which you then just ignore.

    But probably you shouldn't use Observable in that case.
    Consider using Completable instead

提交回复
热议问题