Threading Components that Attach to an Activity/Fragment: These threads are tied to the lifecycle of the activity/fragment and are terminated as soon as the activity/fragment is destroyed.
AsyncTask is the most basic Android component for threading. It’s simple to use and can be good for basic scenarios.