Disposer

General

Category
Free
Tag
FRP
License
MIT License
Min SDK
19 (Android 4.4 KitKat)
Registered
Oct 2, 2018
Favorites
0
Link
https://github.com/sellmair/disposer
See also
RxState
RxPartialApplication
RxActivityResult
ixjava
rxjava-extras

Additional

Language
Kotlin
Version
v3.0.0 (Nov 18, 2020)
Created
Sep 29, 2018
Updated
Nov 18, 2020
Owner
Sebastian Sellmair (sellmair)
Contributors
Fabian Terhorst (FabianTerhorst)
Sebastian Sellmair (sellmair)
SeungHun Choe (uOOOO)
3
Activity
Badge
Generate
Download
Source code
APK file

Advertising

Disposer

Easily dispose RxJava streams with Android's Lifecycle

Checkout my Medium article.

Usage

Gradle
dependencies {
    // Non AndroidX projects
    implementation 'io.sellmair:disposer:1.1.0'
    
    // AndroidX projects rxjava2
    implementation 'io.sellmair:disposer:2.0.0'
    
    // AndroidX projects rxjava3    
    implementation 'io.sellmair:disposer:3.0.0'
}


Or a much sweeter apis, that might look familiar to rxKotlin users:

val disposer: Disposer = /* ... */
disposer += Service.queryAwesomeData().subscribe() // Managed by the disposer
val disposer: Disposer = /* ... */
Service.queryAwesomeData().subscribe().disposeBy(disposer) // Managed by the disposer