0

I should organize 2 HTTP (Retrofit + Rx) and 2 TCP (KryoNet) requests in my SplashActivity. When I get the response from all requests I should start MainActivity. How can I combine requests, handle responses and after that start MainActivity? Help me please, dear developers.

I currently work with Electrum Protocol (https://github.com/kyuupichan/electrumx/blob/master/docs/PROTOCOL.rst)

And it will be an amazing event if you can give an advice how to organize correct tcp request.

Timur Panzhiev
  • 607
  • 6
  • 12

1 Answers1

0

It is a bad practice to use splash screens to make user wait for the response. Moreover this is a tcp request, which means there might be a big file which will make user angry to wait for 3 minutes just for file to download.

The best way to handle these requests and especially when they are needed on app start, is to use asynchronous requests. And after response arrives you do something with it.

Best

  • Maybe you are right, but only if you have deal with big files. In my case i should get only json. just one String row. And more over, I use rx for http requests, which are asynchronous. – Timur Panzhiev Sep 27 '17 at 10:00