RxReceiver
RxJava1/2 for Android BroadcastReceiver. It's easier to extend for that based on BroadcastReceiver.
Who extend:
- RxNet (including RxConnectivity/RxWifi)
- RxTelephony
- RxBattery
Usage
rx2-receiver:
RxReceiver.receives(context, intentFilter).subscribe();
rx2-receiver-kotlin:
intentFilter.receives(context).subscribe()
rx2-receiver-local (v4):
RxReceiverLocal.receives(context, intentFilter).subscribe();
rx2-receiver-local-kotlin (v4):
intentFilter.receivesLocal(context).subscribe()
Installation
RxJava2
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
dependencies {
compile 'com.github.yongjhih.rx-receiver:rx2-receiver:-SNAPSHOT'
compile 'com.github.yongjhih.rx-receiver:rx2-receiver-local:-SNAPSHOT'
// compile 'com.github.yongjhih.rx-receiver:rx2-receiver-kotlin:-SNAPSHOT' // optional
// compile 'com.github.yongjhih.rx-receiver:rx2-receiver-local-kotlin:-SNAPSHOT' // optional
}
RxJava1
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
dependencies {
compile 'com.github.yongjhih.rx-receiver:rx-receiver:-SNAPSHOT'
compile 'com.github.yongjhih.rx-receiver:rx-receiver-local:-SNAPSHOT'
// compile 'com.github.yongjhih.rx-receiver:rx-receiver-kotlin:-SNAPSHOT' // optional
// compile 'com.github.yongjhih.rx-receiver:rx-receiver-local-kotlin:-SNAPSHOT' // optional
}
LICENSE
Apache 2.0