BuildMobile: Performing Network Updates

By Bruce Cooper

In this, the final in this series of posts about Android Widgets, we will build on the previous articles by taking our periodically updating widget and adding a background service to fetch data from the network. To make things easy for ourselves, we’ll show the most recent Tweet from a public timeline from Twitter as our datasource, but this will be easily adaptable to other sources. We’ll also add a configuration activity, prompting the user of the Widget to enter the Twitter user they want to display Tweets for, before the Widget is displayed. If you need to catch up, the previous articles were: How to Code an Android Widget AlarmManager and Sleepy Android Apps Prepping the Demo In our previous example using AlarmManager , we had a working Widget that showed a clock, which updated itself every second through the use of AlarmManager.

Visit link:
BuildMobile: Performing Network Updates

Meet the author
Bruce Cooper is an IT consultant who feels that in order to be able to serve his customers well he should have an understanding of the different technologies that are out there, and how they work. The best way to learn is through doing, so he often takes on small side projects to pick up a new technology.

No Reader comments


Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Get the latest in Front-end, once a week, for free.