Simple RxJava2 binding for Android BroadcastReceiver
RxBroadcastReceivers.fromIntentFilter(context, intentFilter)
.subscribe(intent -> {
// do something with broadcast
});
What's new:
- 1.0.2 library utilizes Context#registerReceiver(BroadcastReceiver, filter, broadcastPermission, scheduler) method when subscription occurs on background thread looper.
- 1.0.5 fixed problem with manifest merger.
To use library with Gradle
dependencies {
implementation 'com.github.karczews:rx2-broadcast-receiver:1.0.6'
}
or using Maven:
<dependency>
<groupId>com.github.karczews</groupId>
<artifactId>rx2-broadcast-receiver</artifactId>
<version>1.0.6</version>
</dependency>