All Projects → JonathanMerritt → RxAssetManager

JonathanMerritt / RxAssetManager

Licence: Apache-2.0 license
An RxJava2 implementation of the Android AssetManager.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to RxAssetManager

UnityBuildManager
Utility for running builds sequence & pushing them to markets & keeping changelog
Stars: ✭ 53 (+0%)
Mutual labels:  assets, asset
unity-visual-novel-toolkit
WIP: Create a Visual Novel with no programming
Stars: ✭ 34 (-35.85%)
Mutual labels:  assets
summon
Summon: your data on caffeine
Stars: ✭ 12 (-77.36%)
Mutual labels:  assets
node-inline-assets
Node API, CLI and Grunt Task for inlining external assets of HTML/CSS files
Stars: ✭ 18 (-66.04%)
Mutual labels:  asset
django-manifest-loader
Simplifies webpack configuration with Django
Stars: ✭ 105 (+98.11%)
Mutual labels:  assets
bookmarks
A PySide2 based file and asset manager for animation and CG productions.
Stars: ✭ 33 (-37.74%)
Mutual labels:  assetmanager
airdrop
A Laravel package to speed up deployment by skipping asset compilation whenever possible.
Stars: ✭ 159 (+200%)
Mutual labels:  assets
laravel-theme
This package creates multiple managed theme infrastructure for Laravel.
Stars: ✭ 19 (-64.15%)
Mutual labels:  assets
unity-scene-groups
Adds a scene group asset to Unity Engine that allows for seamless opening of multiple scenes at once.
Stars: ✭ 33 (-37.74%)
Mutual labels:  asset
Riot-Games-API-Developer-Assets
Riot Games API Developer Assets!
Stars: ✭ 23 (-56.6%)
Mutual labels:  assets
pug-symfony
Pug (Jade) template engine for Symfony
Stars: ✭ 40 (-24.53%)
Mutual labels:  assets
muleify
Muleify - Static Site Generator | Website Bundler | Asset Compiler | Templating | Preproccessor
Stars: ✭ 16 (-69.81%)
Mutual labels:  asset
rollup-plugin-copy-assets
Copy additional assets into the output directory of your rollup bundle.
Stars: ✭ 25 (-52.83%)
Mutual labels:  assets
Unity StarGlow
Simple star-glow effect.
Stars: ✭ 39 (-26.42%)
Mutual labels:  assets
puppeteer-assets
Measuring and monitor assets metrics using Puppeteer and Prometheus
Stars: ✭ 29 (-45.28%)
Mutual labels:  assets
JB2A DnD5e
Templates of spells from the DnD5e ruleset (SRD and PHB), to use on FoundryVTT
Stars: ✭ 28 (-47.17%)
Mutual labels:  assets
assetic
Asset Management for PHP
Stars: ✭ 61 (+15.09%)
Mutual labels:  assets
Unity TransparentWindowManager
Make Unity's window transparent and overlay on desktop.
Stars: ✭ 91 (+71.7%)
Mutual labels:  assets
serverless-s3bucket-sync
Serverless Plugin to sync local folders with an S3 bucket
Stars: ✭ 24 (-54.72%)
Mutual labels:  assets
OpenAssetIO
An open-source interoperability standard for tools and content management systems used in media production.
Stars: ✭ 140 (+164.15%)
Mutual labels:  assetmanager

banner

BINTRAY MAVEN-CENTRAL TRAVIS-CI ANDROID-ARSENAL

What is RXASSETMANAGER?

An RxJava2 implementation of the Android AssetManager.

Any help or contribution is welcome.

How do you GET it?

Use the jcenter() or mavenCentral() repository.

  repositories {
    jcenter()
    mavenCentral()
  }

Then pick a module.

Core

  dependencies {
    implementation "com.github.jonathanmerritt.rxassetmanager:core:x.y.z"
  }

Core-ext - includes :core automatically.

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

How do you USE it?

Create an instance.

val manager = RxAssetManager(context)

Then open the asset as an InputStream for the given file name/path.

Core

manager.open("file.txt").subscribe {  }

Or open as InputStreams for the given folder name/path.

Core-ext

manager.listOpen("folder").subscribe {  }

Please check the sample app for more examples.

What does it DO?

Miminally wraps the original android assetmanager into rxjava2 types.

Core - Intended to be a 1:1 copy, it's only diverted from that slighty.

Function Parameters Description Pair Returns
getLocales() none Gets all locales. no Flowable<String>
close() none Closes the asset manager. no Completable
open(String, Int) path: asset file path, mode: file access mode Opens an asset input stream. yes Maybe<InputStream>
openTypeface(String) path: asset file path Opens an asset font. yes Maybe<Typeface>
openFd(String) path: asset file path Opens an asset file descriptor. yes Maybe<AssetFileDescriptor>
list(String) path: asset folder path Lists asset files. no Flowable<String>
openNonAssetFd(Int, String) cookie: non asset file cookie, path: non asset file path Opens a non asset file. yes Maybe<AssetFileDescriptor>
openXmlResourceParser(Int, String) cookie: xml file cookie, path: xml file path Opens a xml resource parser. yes Maybe<XmlResourceParser>

Core-ext - Extends core while adding more functions, mainly listing chains.

Function Parameters Description Pair Returns
openString(String, Int) path: asset file path, mode: file access mode Opens asset file as string yes Maybe<String>
openBytes(String, Int) path: asset file path, mode: file access mode Opens asset file as a byte array yes Maybe<ByteArray>
openSave(String, Int, String) path: asset file path, mode: file access mode, to: save to location Opens and save asset file. yes Maybe<File>
openBitmap(String, Int) path: asset file path, mode: file access mode Opens asset file as a bitmap. yes Maybe<Bitmap>
listAll(String, Sorting) path: asset folder path, sorting: comparator object Lists asset files recursively. no Flowable<String>
listOpen(String, Int, Boolean) path: asset folder path, mode: file access mode, all: list all files Lists and opens asset files as input streams. yes Flowable<InputStream>
listOpenString(String, Int, Boolean) path: asset folder path, mode: file access mode, all: list all files Lists and opens asset files as strings. yes Flowable<String>
listOpenBytes(String, Int, Boolean) path: asset folder path, mode: file access mode, all: list all files Lists and opens asset files as byte arrays. yes Flowable<ByteArray>
listOpenSave(String, Int, String, Boolean) path: asset folder path, mode: file access mode, to: save to location, all: list all files Lists, opens and saves asset files. yes Flowable<Files>
listOpenBitmap(String, Int, Boolean) path: asset folder path, mode: file access mode, all: list all files Lists and opens asset files as bitmaps. yes Flowable<Bitmap>
listOpenTypeface(String, Int, Boolean) path: asset folder path, mode: file access mode, all: list all files Lists and opens asset files as type faces. yes Flowable<Typeface>
listOpenFd(String, Boolean) path: asset folder path, all: list all files Lists and opens asset files as file descriptors. yes Flowable<AssetFileDescriptor>
listOpenNonAssetFd(Int, String, Boolean) cookie: non asset file cookie, path: non asset folder path, all: list all files Lists and opens non asset files as file descriptors. yes Flowable<AssetFileDescriptor>
listOpenXmlResourceParser(Int, String, Boolean) cookie: xml file cookie, path: xml folder path, all: list all files Lists and opens files as xml resource parsers. yes Flowable<XmlResourceParser>

TODOs

Probable

  • Properly setup scripts for doc and source jars. (*partially done*)
  • Add testing for the app and mocks for the lib. (*partially done*)
  • Make docs descriptive and add comments.
  • Use an actual versioning structure(debug, release & dev, beta, production & flavors etc...).
  • Put sample app on google play.
  • ...

Possible

  • Figure out a better build configuration(maybe buildSrc and/or .kts).
  • Create an advanced fragment in the sample app, for more real examples.
  • Consider handling errors in the api(?).
  • ...

Credits

License

Copyright 2018 Jonathan Merritt [email protected]

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].