I know I should use Services in Android to do stuff in the background from a non-UI thread.
However, I would like to know what is wrong with just spawning a background thread to do the work from an Activity class (within an onClick event for example).
Thanks in advance.
Actually,
Servicesare used for long running tasks, especially those, that run when your activity is not running.Threadscan be used for making some tasks inside your activity. This states, that aThread, created inside yourActivity, can not live outside of the activity that’s created it, when aServicecan. Hope this helps.