

Sam Duke in Android Tagged Technical Android Bound service retained fragment asynctask background workĪirsource design and develop apps for ourselves and for our clients. For more information, check out the Loaders dev docs. Specifically, a Loader should 'monitor the source of their data and deliver new results when the contents change'. These are more appropriate for lists with cursors. They can be created and reconnected to across activity config changes. These function similarly to a retained fragment. Ultimately, there are a couple of tools here you can put to good use in the right circumstances. Even if you aren't using a shared resource and don't require a bound service, you can still revert to using an AsyncTask with a retained fragment. When you are working with a shared, scarce resource (internet, bluetooth connection, lengthy processing pipelines) and want to make sure your requests are guaranteed to make it to the UI. Public class MainActivity extends Activity When is this appropriate
