https://github.com/malekkamel/rxgallery
https://github.com/malekkamel/rxgallery
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/malekkamel/rxgallery
- Owner: MalekKamel
- Created: 2018-09-26T15:18:04.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-26T16:25:49.000Z (about 7 years ago)
- Last Synced: 2025-01-27T15:43:32.564Z (9 months ago)
- Language: Java
- Size: 1.01 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RxGallery
### RxJava wrapper for Android Gallery & Camera.
#### With RxGallery you get rid of Activity.onActivityResult() and receive the result on the call site. Also, no runtime permissions are required
# Features
- [ ] Easy-to-use APIs
- [ ] Results are delivered at the call site not at Activity.onActivityResult
- [ ] Handle all Camera and Gallery with the same APIs.
- [ ] Handle runtime permissions.# Installation
[  ](https://bintray.com/shabankamel/android/RxGallery/_latestVersion)
```groovy
dependencies {
implementation 'com.sha.kamel:rx-gallery:1.0.0@aar'
}repositories {
maven {
url "https://dl.bintray.com/shabankamel/android"
}
...
}
```# Usage
```java
new RxGallery()
.captureImage(fragmentActivity)
.subscribe(bitmap -> imageView.setImageBitmap(bitmap));
```
## Pick Image
```java
new RxGallery()
.image(fragmentActivity)
.subscribe(result -> {
// Handle logic here
};
```
## Pick Multiple Images
```java
new RxGallery()
.multipleImages(fragmentActivity)
.subscribe(result -> {
// Handle logic here
};
```
## Pick Video
```java
new RxGallery()
.video(fragmentActivity)
.subscribe(result -> {
// Handle logic here
};
```
## Pick Multiple Videos
```java
new RxGallery()
.multipleVideos(fragmentActivity)
.subscribe(result -> {
// Handle logic here
};
```
## Pick Audio
```java
new RxGallery()
.audio(fragmentActivity, MimeType.VIDEO, MimeType.AUDIO)
.subscribe(result -> {
// Handle logic here
};
```
## Pick Multiple Audio Files
```java
new RxGallery()
.multipleAudio(fragmentActivity)
.subscribe(result -> {
// Handle logic here
};
```## Request By Type
#### Yo can request any type by
```java
new RxGallery(fragmentActivity, MimeType.VIDEO, MimeType.AUDIO)
.requestByType()
.subscribe(result -> {
// Handle logic here
};
```## Request Multiple By Type
```java
new RxGallery(fragmentActivity, MimeType.VIDEO, MimeType.AUDIO)
.requestMultipleByType()
.subscribe(result -> {
// Handle logic here
};
```### See 'app' module for the full code.
# License
## Apache license 2.0