Start Android clock widget not updating

Android clock widget not updating

Now we’ve told Android that our application is interested in receiving these intents, and we’ve configured the ‘Alarm Manager’ to send the intents out on a regular basis.

In my first article explaining How to Code an Android Widget, we covered the steps required to create a basic widget that updates on a non-frequent basis and uses standard components.

We couldn’t get it to update the widget on a frequent basis however.

This allows something to happen at a particular time, even if the application is not running at that time.

That’s no good if you want a frequently updating widget, like a clock.

In this article, I will show you how to add a periodically firing update to your Widget using an ‘Alarm Manager’.

I make the assumption that you have already read the introduction Android Widget Coding article, or that you know the basics of App Widget programming.

In this example, we’ve used the technique to update a widget on a very frequent basis, but it can also be used to do periodic updates for other components in your application.