Norway


-  - The Android Arsenal – File System

-  - The Android Arsenal – File System -  - The Android Arsenal – File System -  - The Android Arsenal – File System

An RxJava2 implementation of the 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  Path").subscribe(inputStream -> {}); 
  }
}

Core-Ext

public class SomeActivity extends Activity { 
  private Disposable listOpenPath() { 
    return new RxAssetManager(this).listOpen("Asset Folder/File Path").subscribe(inputStream -> {}); 
  }
}

TODO

License

Apache-2.0

Copyright  Jonathan Merritt 11R00TT00R11@GMAIL.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here