GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nekocode/RxActivityResult: This is a library that can help you to receive results from startActivityForResult() as an Observable.

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
gradle/wrapper
gradle/wrapper
 
 
rxactivityresult-compact
rxactivityresult-compact
 
 
rxactivityresult
rxactivityresult
 
 
sample
sample
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

RxActivityResult

Apache 2.0 License Release

This is a library that can help you to receive results from startActivityForResult() as an Observable. You can use it in Activity or Fragment. It actullay call the startActivityForResult() in a Headless-Fragment that attaching to your Activity(/Fragment). And publish the activity results in the Headless-Fragment's onActivityResult().

Supports only RxJava 2 now.

Usage

Example:

RxActivityResult.startActivityForResult(this, intent, REQUEST_CODE)
        .subscribe(new Consumer<ActivityResult>() {
            @Override
            public void accept(@NonNull ActivityResult result) throws Exception {
                if (result.isOk()) {
                    final Intent data = result.getData();
                    // DO SOME THING
                }
            }
        });

See the sample for more detail.

Using with gradle

  • Add the JitPack repository to your build.gradle repositories:
repositories {
    // ...
    maven { url "https://jitpack.io" }
}
  • Add the core dependency:
dependencies {
    compile 'com.github.nekocode.rxactivityresult:rxactivityresult:{lastest-version}'
}
  • (Optional) Add the below library if you need to support api 9 and later. Besides, if you already add support-v4 dependency, I will also suggest you to use this compact library, and then use the RxActivityResultCompact instead of the RxActivityResult.
dependencies {
    compile 'com.github.nekocode.rxactivityresult:rxactivityresult-compact:{lastest-version}'
}

About

This is a library that can help you to receive results from startActivityForResult() as an Observable.

Topics

android

Resources

Readme
Activity

Stars

75 stars

Watchers

2 watching

Forks

7 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.