The Android Developer guide has a decent section on the use of Fragments. One way to use Fragments is without a UI. There are a few references to using this as a means of
I concur with Greg Ennis.
I'm working on an app right now that has to execute a series of RESTful api calls. For the most part, these are just done within a single activity. But I just used a headless fragment to deal with a case where two different activities each needed to make the same sequence of multiple calls and, of course, handle errors anywhere in the sequence. By centralizing the sequence in a fragment, I could avoid duplicating a fair amount of code.
We have another api call that gets back a LOT of data which is all being parsed on the UI thread right now and takes too long. In a future version of the backend api, the server side will page the data and our app will be required to make a series of api calls to get the complete results. I'm thinking that would be a great application for a retained headless fragment. The initiating activity can start the headless fragment and the call sequence. If there's no error from the first call, that activity can start the next activity, to display initial results, while the fragment just keeps chugging and asking the server for the next page of data. The api calls are already done on a background thread. I'm pretty sure the retained fragment will have to run on a worker thread of its own.
There's more info about retained fragments at Understanding Fragment's setRetainInstance(boolean)