Rx Receivers

Additional

Language
Java
Version
0.1.0 (Oct 12, 2016)
Created
Sep 6, 2015
Updated
Apr 9, 2017 (Retired)
Owner
Prateek Srivastava (f2prateek)
Contributors
Vladislav Bauer (vbauer)
Prateek Srivastava (f2prateek)
2
Activity
Badge
Generate
Download
Source code
APK file

Commercial

Rx Receivers

Reactive BroadcastReceiver implementations for Android.

Note: work in progress

Usage

Register a BroadcastReceiver with the given IntentFilter, which emits Intent values:

RxBroadcastReceiver.create(context, new IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION))
  .subscribe((Action1) (intent) -> { textView.setText(intent.toString()); });

Or use the pre-defined factory methods.

RxTelephonyManager.phoneStateChanges(context).subscribe();
RxWifiManager.wifiStateChanges(context).subscribe();
RxWifiManager.networkStateChanges(context).subscribe();
RxWifiManager.supplicantConnectionChanges(context).subscribe();
RxWifiManager.supplicantStateChanges(context).subscribe();

Download

compile 'com.f2prateek.rx.receivers:rx-receivers:0.1.0'

License

Copyright 2015 Prateek Srivastava

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.