RxT4A

General

Category
Free
Tag
FRP
License
MIT License
Min SDK
14 (Android 4.0–4.0.2 Ice Cream Sandwich)
Registered
Aug 8, 2015
Favorites
0
Link
https://github.com/cookpad/RxT4A
See also
RxAgera
Disposer
RxJavaJoins
RxHub
Rx2Groups

Additional

Language
Java
Version
v0.10.0 (Aug 17, 2015)
Created
Jul 11, 2015
Updated
Jan 31, 2016 (Retired)
Owner
Cookpad (cookpad)
Contributors
FUJI Goro (gfx)
goka (gotokatsuya)
2
Activity
Badge
Generate
Download
Source code
APK file

Announcement

NAME

RxT4A - RxJava Toolbox for Android

SYNOPSIS

// AndroidSchedulers

Scheduler scheduler = AndroidSchedulers.mainThread();
Scheduler scheduler = AndroidSchedulers.from(new Handler());

// AndroidCompositeSubscription

final AndroidCompositeSubscription s = new AndroidCompositeSubscription();

s.add(subscription1);
s.add(subscription2);

s.unsubscribe(); // unsubscribe 1 and 2

// it is reusable!
s.add(subscription3);
s.add(subscription4);

s.unsubscribe(); // unsubscribe 3 and 4, too!

// OperatorAddToCompositeSubscription

Observable.just("foo")
        .lift(new OperatorAddToCompositeSubscription<String>(s))
        .delay(5, TimeUnit.MILLISECONDS)
        .subscribe(...);

s.unsubscribe(); // unsubscribe the above subscription

DESCRIPTION

This is a fork of RxAndroid.

AndroidSchedulers

This is almost the same as RxAndroid's AndroidSchedulers.

AndroidCompositeSubscription

This is a variation of CompositeSubscription but can be reused multiple times.

OperatorAddToCompositeSubscription

Add a subscription to AndroidCompositeSubscription in operator chains.

AndroidSubscriptions

This class provides a way to create subscriptions for Android applications.

Subscription subscription = observable.subscribe(subscriber);

// Like Subscriptions.create(Action0), but the action is called on the main thread.
subscription.add(AndroidSubscriptions.unsubscribeOnMainThread(new Action0() {
    @Override
    public void call() {
        // You can touch touch views.
    }
}));

INSTALL

dependencies {
    compile 'com.cookpad.android.rxt4a:rxt4a:1.0.0'
}

LICENSE

The MIT License

AUTHOR

Cookpad Inc.