create
Creates a new cold Observable. When the observable is subscribed to, onSubscribe is called with the subscriber as a parameter, and should start emitting to the subscriber using Subscriber.onNext.
onSubscribe should always end with either Subscriber.onError or Subscriber.onCompleted.
Note that the resulting Observable is not backpressure-aware.
Return
a cold Observable
Parameters
T
the type of data that the subscriber will receive
on Subscribe
a function that is called when the observable is subscribed to