|
| 1 | +<p align="center"> |
| 2 | +<img alt="PRDownloader" src=https://raw.githubusercontent.com/amitshekhariitbhu/RxJavaPriorityScheduler/master/assets/rxps.png /> |
| 3 | +</p> |
1 | 4 |
|
| 5 | +# RxPS - RxJavaPriorityScheduler - A RxJava Priority Scheduler library for Android and Java applications |
| 6 | + |
| 7 | +### Overview of RxPS - RxJavaPriorityScheduler library |
| 8 | +* RxPS is used to set the priority for the given task. |
| 9 | +* Simple way to set the priority for the given task. |
| 10 | + |
| 11 | +## [My Personal Blog - amitshekhar.me](https://amitshekhar.me/blog) - High-quality content to learn Android concepts. |
| 12 | + |
| 13 | +## Using RxPS - RxJavaPriorityScheduler Library in your Android application |
| 14 | + |
| 15 | +Add this in your build.gradle |
| 16 | +```groovy |
| 17 | +implementation 'com.mindorks.scheduler:rxps:0.1.0' |
| 18 | +``` |
| 19 | + |
| 20 | +### Setting low level priority for a task - use `RxPS.low()` |
| 21 | +```java |
| 22 | +getObservable() |
| 23 | +.subscribeOn(RxPS.low()) |
| 24 | +.subscribe(getObserver()); |
| 25 | + |
| 26 | +// or |
| 27 | + |
| 28 | +getObservable() |
| 29 | +.subscribeOn(RxPS.get(Priority.LOW)) |
| 30 | +.subscribe(getObserver()); |
| 31 | +``` |
| 32 | + |
| 33 | +### Setting medium level priority for a task - use `RxPS.medium()` |
| 34 | +```java |
| 35 | +getObservable() |
| 36 | +.subscribeOn(RxPS.medium()) |
| 37 | +.subscribe(getObserver()); |
| 38 | + |
| 39 | +// or |
| 40 | + |
| 41 | +getObservable() |
| 42 | +.subscribeOn(RxPS.get(Priority.MEDIUM)) |
| 43 | +.subscribe(getObserver()); |
| 44 | +``` |
| 45 | + |
| 46 | +### Setting high level priority for a task - use `RxPS.high()` |
| 47 | +```java |
| 48 | +getObservable() |
| 49 | +.subscribeOn(RxPS.high()) |
| 50 | +.subscribe(getObserver()); |
| 51 | + |
| 52 | +// or |
| 53 | + |
| 54 | +getObservable() |
| 55 | +.subscribeOn(RxPS.get(Priority.HIGH)) |
| 56 | +.subscribe(getObserver()); |
| 57 | +``` |
| 58 | + |
| 59 | +### Setting immediate level priority for a task - use `RxPS.immediate()` |
| 60 | +```java |
| 61 | +getObservable() |
| 62 | +.subscribeOn(RxPS.immediate()) |
| 63 | +.subscribe(getObserver()); |
| 64 | + |
| 65 | +// or |
| 66 | + |
| 67 | +getObservable() |
| 68 | +.subscribeOn(RxPS.get(Priority.IMMEDIATE)) |
| 69 | +.subscribe(getObserver()); |
| 70 | +``` |
| 71 | + |
| 72 | +### TODO |
| 73 | +* Documentation |
| 74 | +* Test Cases |
| 75 | +* Customizations |
| 76 | + |
| 77 | +## If this library helps you in anyway, show your love :heart: by putting a :star: on this project :v: |
| 78 | + |
| 79 | +You can connect with me on: |
| 80 | + |
| 81 | +- [Twitter](https://twitter.com/amitiitbhu) |
| 82 | +- [LinkedIn](https://www.linkedin.com/in/amit-shekhar-iitbhu) |
| 83 | +- [GitHub](https://github.com/amitshekhariitbhu) |
| 84 | +- [Facebook](https://www.facebook.com/amit.shekhar.iitbhu) |
| 85 | + |
| 86 | +[**Read all of my blogs here.**](https://amitshekhar.me/blog) |
| 87 | + |
| 88 | +### License |
| 89 | +``` |
| 90 | + Copyright (C) 2022 Amit Shekhar |
| 91 | +
|
| 92 | + Licensed under the Apache License, Version 2.0 (the "License"); |
| 93 | + you may not use this file except in compliance with the License. |
| 94 | + You may obtain a copy of the License at |
| 95 | +
|
| 96 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 97 | +
|
| 98 | + Unless required by applicable law or agreed to in writing, software |
| 99 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 100 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 101 | + See the License for the specific language governing permissions and |
| 102 | + limitations under the License. |
| 103 | +``` |
| 104 | + |
| 105 | +### Contributing to RxPS - RxJavaPriorityScheduler |
| 106 | +All pull requests are welcome, make sure to follow the [contribution guidelines](CONTRIBUTING.md) |
| 107 | +when you submit pull request. |
0 commit comments