/rx-result

Primary LanguageKotlin

Rx-Result

ReleaseBuildStatus

Rx-Rsult wrapper startActivityResult some logic.

install

dependencies {
    implementation 'io.github.keep2iron:rx-result:$latest_version'
}

Simple usage snippet

RxResult(this)
    .prepare<TargetActivity>()
    .requestForResult("arg1" to "value")  //with argument
    .filter { it.result }				  //filter intent resultCode == Activity.RESULT_OK
    .subscribe {
        Toast.makeText(
            requireContext(),
            "it : ${it.data.getStringExtra("strData")}",
            Toast.LENGTH_SHORT
        ).show()
    }