Now that we have a better understanding of the life cycle of a job, it's a good moment to go back to our Android RSS reader and improve it.
RSS – Reading from multiple feeds concurrently
Supporting a list of feeds
Let's go back to our Android Studio project and create an immutable list to hold the feeds that we will fetch. For now, three feeds will be enough:
class MainActivity : AppCompatActivity() {
val feeds = listOf(
"https://www.npr.org/rss/rss.php?id=1001",
"http://rss.cnn.com/rss/cnn_topstories.rss",
"http://feeds.foxnews.com/foxnews/politics?format=xml"
)
...
}
Now we have a list of feeds that contain the URLs of NPR, CNN, and Fox News...