Is PollService being used?


Hi, I was worked through the example a week or so back and started working on a similar task.

In looking at the code now I see in onHandleIntent the arraylist of galleryitems getting created. What I can’t figure out is how is this array list send back to the Fragment.

In looking at the code for the Fragment it is still calling the asynctask rather than the PollService, is this wrong or what am I missing?

Your assistance appreciated.


You are correct - PhotoGalleryFragment does not use PollService to fetch GalleryItems at all. PhotoGalleryFragment turns the alarm that starts PollService on and off, but otherwise they are independent components.

PollService is only used to poll the web service to see if there are any new results. It checks its own results against the last results it found, and posts a notification if it finds a new result.