Observable vs. Service in Android

Viewed 1362

I want to migrate from Android API means of asynchronous execution to Rx. Particularly I have a photo gallery in my application which frequently fetches new photos from a server as the user swipes the photos (it's based on ViewPager with lateral swiping).

It happened like this: whenever the ViewPager wanted a new photo it asked its presenter (in MVP terms) to fetch it which in turn went to the model. The model sent a new intent to an IntentService to download the new image: How it worked with IntentService

Now it looks another way:How it works now, with Rx

In case of IntentService if we have a lot of requests to download an image these requests are queued in a single IntentService and processed one at a time.

With Rx many requests to download an image yield many Observables and perhaps consume a lot of memory (I haven't completed refactoring to Rx yet and hence haven't made experiments but probably someone already thought about it).

Am I right in my misgiving? Is there a better way to do the same thing with RxAndroid?

0 Answers
Related