I\'m in the process of learning RxJava and have went thru several articles and videos. I totally felt awesome of what RxJava can offer, so I think currently getting the sense of
I'm sure that there are going to be a bunch of other opinions, but so far, I've taken a couple of different approaches:
If you want a relatively small amount of data (and you can guarantee that it will always have a known upper bound on size), then:
If you need an unbounded number of rows, do something similar to the above, but return the Cursor.
EDIT: sample code:
private Map getDataFromDatabase() {
Map result = new HashMap<>();
// do whatever you need to (i.e. db query, cursor) to fill it in
return result;
}
private Callable