Skip to content

Commit 6122a3d

Browse files
Add example in README.md
1 parent e19895a commit 6122a3d

File tree

1 file changed

+71
-1
lines changed

1 file changed

+71
-1
lines changed

README.md

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,73 @@
77
[![Mindorks Community](https://img.shields.io/badge/join-community-blue.svg)](https://mindorks.com/join-community)
88
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
99

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.
1013

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+
1177
### License
1278
```
1379
Copyright (C) 2018 MINDORKS NEXTGEN PRIVATE LIMITED
@@ -23,4 +89,8 @@
2389
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2490
See the License for the specific language governing permissions and
2591
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

Comments
 (0)