0

Please consider this scenario. I am working on an app in which the notifications are getting updated frequently, say 5 seconds. I have been initializing these 'updating' network requests in a Service and requests are processed in AsyncTasks. I am changing all my networking operations and started using Retrofit library. My question is if I want to make frequent requests, should I initiate the retrofit calls from a service? or shall I call these requests directly not within the service?

DGN
  • 702
  • 3
  • 12
  • 2
    I think it is very dependent on your implementation, and what you are trying to accomplish. Please see the answer @Jake Wharton provides here : http://stackoverflow.com/questions/21006807/does-retrofit-make-network-calls-on-main-thread –  Oct 16 '15 at 13:01
  • I think If you like to have synchronous calls so you can make it from background service with Call.execute(). if Asynchronous with Callbacks so no need because requests happen in the background and responses already called in the main thread. – aselims Nov 11 '15 at 19:26

0 Answers0