public static final class RxNetworkInfoPredicate.State
extends java.lang.Object
RxNetwork
by network state.
Example usage:
rxnetwork.observe()
.subscribeOn(Schedulers.io())
.filter(hasState(CONNECTED, CONNECTING))
.observeOn(AndroidSchedulers.mainThread())
.subscribe(...);
| Modifier and Type | Method and Description |
|---|---|
static io.reactivex.functions.Predicate<RxNetworkInfo> |
hasState(android.net.NetworkInfo.State... networkStates)
Determines if any of provided
states occurred. |
public static io.reactivex.functions.Predicate<RxNetworkInfo> hasState(android.net.NetworkInfo.State... networkStates)
states occurred.networkStates - one or many NetworkInfo.Statetrue if any of the given network states occurred, false otherwise