Tinder / Scarlet

A Retrofit inspired WebSocket client for Kotlin, Java, and Android
Other
3.24k stars 239 forks source link

Flowable and @Json not working #168

Closed SaeedNoshadi89 closed 2 years ago

SaeedNoshadi89 commented 3 years ago

Hi. I added these libraries:

 implementation "com.tinder.scarlet:scarlet:$scarlet_version"
    // Optional
    implementation "com.github.tinder.scarlet:scarlet-websocket-okhttp:$scarlet_version"
    implementation "com.github.tinder.scarlet:scarlet-stream-adapter-rxjava2:$scarlet_version"
    implementation "com.github.tinder.scarlet:scarlet-message-adapter-moshi:$scarlet_version"
    implementation "com.github.tinder.scarlet:scarlet-lifecycle-android:$scarlet_version"

But when I want to use Flowable and @Json, it's not working. my app can't find this class and annotation

dri94 commented 2 years ago

Flowable is from io.reactivex.Flowable. So import RxJava into your project.

aaronweihe commented 2 years ago

to use Flowable, include the rxjava2 adapter. to use @Json, include the moshi adapter and Moshi library to set things up.