/ Miscellaneous

An RxJava2 implementation of the Android AssetManager

An RxJava2 implementation of the Android AssetManager

Rx AssetManager

An RxJava2 implementation of the Android AssetManager.

Inspired by the blog post RxRecipes: Wrap your way to Rx by Scott Meschke.

Any help or contribution is welcome.

Download

Gradle

  repositories {
    jcenter()
    //OR
    mavenCentral()
  }

  dependencies {
    implementation "com.github.jonathanmerritt.rxassetmanager:core OR* core-ext:x.y.z"
  }

Maven

<dependencies>
 <dependency>
   <groupId>com.github.jonathanmerritt.rxassetmanager</groupId>
   <artifactId>core OR* core-ext</artifactId>
   <version>x.y.z</version>
   <type>pom</type>
 </dependency>
</dependencies>

*core-ext will include core automatically.

Usage

This example will either open or list and open any files as InputStreams.

Check the sample apps for more detailed examples.

Core

public class SomeActivity extends Activity {
  private Disposable openPath() { return new RxAssetManager(this).open("Asset").subscribe(is -> {}); }
}

Core-Ext

public class SomeActivity extends Activity { 
  private Disposable listOpenPath() { return new RxAssetManager(this).listOpen("Assets").subscribe(is -> {}); }
}

TODO

  • Add javadoc.
  • ...

GitHub