|
1 | | -<p align="center"> |
2 | | -<img alt="PRDownloader" src=https://raw.githubusercontent.com/MindorksOpenSource/RxJavaPriorityScheduler/master/assets/rxps.png /> |
3 | | -</p> |
4 | 1 |
|
5 | | -# RxPS - RxJavaPriorityScheduler - A RxJava Priority Scheduler library for Android and Java applications |
6 | | -[](https://mindorks.com/open-source-projects) |
7 | | -[](https://mindorks.com/join-community) |
8 | | -[](https://opensource.org/licenses/Apache-2.0) |
9 | | - |
10 | | -### Overview of RxPS - RxJavaPriorityScheduler library |
11 | | -* RxPS is used to set the priority for the given task. |
12 | | -* Simple way to set the priority for the given task. |
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.1.0' |
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 | | -### TODO |
74 | | -* Documentation |
75 | | -* Test Cases |
76 | | -* Customizations |
77 | | - |
78 | | -## If this library helps you in anyway, show your love :heart: by putting a :star: on this project :v: |
79 | | - |
80 | | -[Check out Mindorks awesome open source projects here](https://mindorks.com/open-source-projects) |
81 | | - |
82 | | -### License |
83 | | -``` |
84 | | - Copyright (C) 2018 MINDORKS NEXTGEN PRIVATE LIMITED |
85 | | -
|
86 | | - Licensed under the Apache License, Version 2.0 (the "License"); |
87 | | - you may not use this file except in compliance with the License. |
88 | | - You may obtain a copy of the License at |
89 | | -
|
90 | | - http://www.apache.org/licenses/LICENSE-2.0 |
91 | | -
|
92 | | - Unless required by applicable law or agreed to in writing, software |
93 | | - distributed under the License is distributed on an "AS IS" BASIS, |
94 | | - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
95 | | - See the License for the specific language governing permissions and |
96 | | - limitations under the License. |
97 | | -``` |
98 | | - |
99 | | -### Contributing to RxPS - RxJavaPriorityScheduler |
100 | | -All pull requests are welcome, make sure to follow the [contribution guidelines](CONTRIBUTING.md) |
101 | | -when you submit pull request. |
0 commit comments