|
7 | 7 | [](https://mindorks.com/join-community) |
8 | 8 | [](https://opensource.org/licenses/Apache-2.0) |
9 | 9 |
|
| 10 | +### Overview of RxPS - RxJavaPriorityScheduler library |
| 11 | +* RxPS is used to set the priority for the given task. |
| 12 | +* Easy way to set the priority for the given task. |
10 | 13 |
|
| 14 | +## Using RxPS - RxJavaPriorityScheduler Library in your Android application |
| 15 | + |
| 16 | +Add this in your build.gradle |
| 17 | +```groovy |
| 18 | +implementation 'com.mindorks.scheduler:rxps:0.0.1' |
| 19 | +``` |
| 20 | + |
| 21 | +### Setting low level priority for a task - use RxPS.low() |
| 22 | +```java |
| 23 | +getObservable() |
| 24 | +.subscribeOn(RxPS.low()) |
| 25 | +.subscribe(getObserver()); |
| 26 | + |
| 27 | +// or |
| 28 | + |
| 29 | +getObservable() |
| 30 | +.subscribeOn(RxPS.get(Priority.LOW)) |
| 31 | +.subscribe(getObserver()); |
| 32 | +``` |
| 33 | + |
| 34 | +### Setting medium level priority for a task - use RxPS.medium() |
| 35 | +```java |
| 36 | +getObservable() |
| 37 | +.subscribeOn(RxPS.medium()) |
| 38 | +.subscribe(getObserver()); |
| 39 | + |
| 40 | +// or |
| 41 | + |
| 42 | +getObservable() |
| 43 | +.subscribeOn(RxPS.get(Priority.MEDIUM)) |
| 44 | +.subscribe(getObserver()); |
| 45 | +``` |
| 46 | + |
| 47 | +### Setting high level priority for a task - use RxPS.high() |
| 48 | +```java |
| 49 | +getObservable() |
| 50 | +.subscribeOn(RxPS.high()) |
| 51 | +.subscribe(getObserver()); |
| 52 | + |
| 53 | +// or |
| 54 | + |
| 55 | +getObservable() |
| 56 | +.subscribeOn(RxPS.get(Priority.HIGH)) |
| 57 | +.subscribe(getObserver()); |
| 58 | +``` |
| 59 | + |
| 60 | +### Setting immediate level priority for a task - use RxPS.immediate() |
| 61 | +```java |
| 62 | +getObservable() |
| 63 | +.subscribeOn(RxPS.immediate()) |
| 64 | +.subscribe(getObserver()); |
| 65 | + |
| 66 | +// or |
| 67 | + |
| 68 | +getObservable() |
| 69 | +.subscribeOn(RxPS.get(Priority.IMMEDIATE)) |
| 70 | +.subscribe(getObserver()); |
| 71 | +``` |
| 72 | + |
| 73 | +## If this library helps you in anyway, show your love :heart: by putting a :star: on this project :v: |
| 74 | + |
| 75 | +[Check out Mindorks awesome open source projects here](https://mindorks.com/open-source-projects) |
| 76 | + |
11 | 77 | ### License |
12 | 78 | ``` |
13 | 79 | Copyright (C) 2018 MINDORKS NEXTGEN PRIVATE LIMITED |
|
23 | 89 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
24 | 90 | See the License for the specific language governing permissions and |
25 | 91 | limitations under the License. |
26 | | -``` |
| 92 | +``` |
| 93 | + |
| 94 | +### Contributing to RxPS - RxJavaPriorityScheduler |
| 95 | +All pull requests are welcome, make sure to follow the [contribution guidelines](CONTRIBUTING.md) |
| 96 | +when you submit pull request. |
0 commit comments