Hot answers tagged

4 votes
Accepted

About handling data from an API call through RX and Retrofit

Let me start by saying I am by no means an expert in Rx. I have no authoritative references to back up my suggested improvements. They come from the little experience I have, as well as some ...
Tim's user avatar
  • 156
4 votes
Accepted

Getting products for category

The method name getProducts looks like a getter. However, there is some logic inside and getters usually don't have arguments. ...
Antot's user avatar
  • 3,637
3 votes
Accepted

Getting data with RxJava and retrofit

You should use flat to emit each wordApi and then you will be able to filter your data and apply your function one by one. ...
Rodrigo Henriques's user avatar
2 votes

RXJava operate on exiting List instead of creating new

You're just abusing the library here. What you're doing can be done significantly more succinctly in standard java API: ...
Vogel612's user avatar
  • 25.2k
2 votes
Accepted

Dagger 2 test application

Not sure why you complicated it, a simple set of operators could do the same: ...
akarnokd's user avatar
  • 136
2 votes

Manager for OAuth2 tokens using RxJava

A few small notes from skimming the code here: Why does getValidAccessToken() return a String when you don't seem to have any qualms about exposing ...
Vogel612's user avatar
  • 25.2k
2 votes

Coordinating Threads with Reactive Streams

You are jumping through a lot of hoops to get your queue, consumer, and observer strategies aligned. I look at your code, and I don't really follow it all. Part of the reason is that I don't know ...
rolfl's user avatar
  • 97.3k
2 votes
Accepted

Class for user actions

Extract your preferences code into extra class or create extension functions to get those objects. Ex. ...
K.H.'s user avatar
  • 2,568
1 vote

Parsing CAN frames from a ByteArray

Nesting Branches You were worried your code might be a bit ugly. I consider deeply nested branches ugly aka a penalty in readability when they can easily be avoided. For example, your function ...
dfhwze's user avatar
  • 13.9k
1 vote

Async Task using RxJava2 in Android

in general, I believe it would be better if you included this in some sort of chain. What I mean here: don't return void, rather an Observable don't show the ...
Antek's user avatar
  • 111
1 vote

Creating new async tasks

I would start by trying to make a separate package for making the requests, something like a presenter(MVP pattern - MVP in Android). Because, the way you have it now, it is hard to be tested and ...
Andrei T's user avatar
  • 181
1 vote
Accepted

Testing a ViewModel in Android - MVVM with DataBinding

It's been a while and I haven't got a review for the question. I am attempting to answer my own question. Do point out any mistakes. Happy to take it. Create Mocks Define return values for methods ...
Raghunandan's user avatar
1 vote

Finding local C# servers on a Java client using UDP and reactive extensions

return Disposable.Empty; By returning Disposable.Empty, client code has no way to stop listening on that port. Consider ...
mjolka's user avatar
  • 16.2k
1 vote
Accepted

Android UI code for a test job

You seem to write your code C-style. You prefix your instance variables with m, like mStatus and ...
Pimgd's user avatar
  • 22.3k

Only top scored, non community-wiki answers of a minimum length are eligible