Creating a news feed service
In this practical example, we will put together all the knowledge acquired during the first three recipes in order to create a news feed service. This news feed service will first populate a
ListView element of news, and then will periodically check if fresh news is available regardless of whether the activity is focused or not.
To follow this recipe, create a new project named
How to do it...
- Create a layout named
Welcome.xmland update it to the following:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ListView android:id="@+id/feedItemsListView" android:layout_width="fill_parent" ...