File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ RxJava 2 APIs for ObjectBox
2
+ ===========================
3
+ While ObjectBox has [ data observers and reactive extensions] ( https://docs.objectbox.io/data-observers-and-rx ) built-in,
4
+ this project adds RxJava 2 support.
5
+
6
+ For general object changes, you can use ` RxBoxStore ` to create an ` Observable ` .
7
+
8
+ ` RxQuery ` allows you to interact with ObjectBox ` Query ` objects using:
9
+ * Flowable
10
+ * Observable
11
+ * Single
12
+
13
+ For example to get query results and subscribe to future updates (Object changes will automatically emmit new data):
14
+
15
+ ``` java
16
+ Query query = box. query(). build();
17
+ RxQuery . observable(query). subscribe(this );
18
+ ```
19
+
20
+ Adding the library to your project
21
+ -----------------
22
+ Grab via Gradle:
23
+ ``` gradle
24
+ compile 'io.objectbox:objectbox-rxjava:objectboxVersion'
25
+ ```
26
+
27
+ Links
28
+ -----
29
+ [ Data Observers and Rx Documentation] ( https://docs.objectbox.io/data-observers-and-rx )
30
+
31
+ [ Note App example] ( https://github.com/objectbox/objectbox-examples/blob/master/objectbox-example/src/main/java/io/objectbox/example/ReactiveNoteActivity.java )
You can’t perform that action at this time.
0 commit comments