Skip to content

a android library for use service binding with rxjava

Notifications You must be signed in to change notification settings

jiechic/RxService

Repository files navigation

RxService

License Jcenter

A android library for use service binding with rxjava

Installation

Using JCenter:

repositories {
    jcenter()
}

dependencies {
    compile 'com.jiechic.android.library:rxservice:1.0.0'
}

Requirements

RxJava 2.1.0+

sourceCompatibility JavaVersion.VERSION_1_8

targetCompatibility JavaVersion.VERSION_1_8

Usage

Just enable RxService as soon as possible. In Android, for example:

class MainActivity : Activity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        RxService(this, ServiceHandler::class.java)
                .connectService()
                .map { IServiceHandler.Stub.asInterface(it) }
                .subscribe { Log.d(MainActivity::class.java.simpleName, it.sendAndGet("hello world")) }
    }
}

About

a android library for use service binding with rxjava

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages