Archive for the ‘Services’ Category

Text Clock – Part 8

Friday, March 8th, 2013

Following on from last week’s minor detour, we’ll resume this series by adding another new feature that was introduced in Android 4.2 (Jelly Bean): Daydreams.

A PC-style screensaver is not practical on a mobile device much of the time because on a mobile device you want to power down the display when the device is idle to conserve power. However, from 4.2 onwards Android supports a Daydream which is a screensaver mode which becomes active when the device is connected to an external power source, and typically the Daydream is displayed rather than powering down the display as power is not so much of an issue. This can be useful for having a night mode, or providing custom behaviours when the device is docked. In this article we’ll add a Daydream to our Text Clock app.
(more…)

DeliciousStumbleUponRedditDiggBookmark/FavoritesShare

Text Clock – Part 4

Friday, February 8th, 2013

In the previous article we got the time displaying on our Text Clock app widget, but the time did not update. In this article we’ll use AlarmManager to get the widget updating periodically.
(more…)

DeliciousStumbleUponRedditDiggBookmark/FavoritesShare

Text Clock – Part 3

Friday, February 1st, 2013

In the previous article we got an app widget background displaying on the home screen, but it does not actually display any real data, which is somewhat useless! In this article we’ll look at displaying the time on our app widget.
(more…)

DeliciousStumbleUponRedditDiggBookmark/FavoritesShare

Background Tasks – Part 6

Friday, March 16th, 2012

In the previous article we discussed the Android Service architecture and looked at how to properly implement your Service to both behave well and avoid being killed by the OS or a TaskKiller. In this concluding article in this series well look at IntentService and look at ways that we can trigger UI updates from a Service.
(more…)

DeliciousStumbleUponRedditDiggBookmark/FavoritesShare

Background Tasks – Part 5

Friday, March 9th, 2012

Previously in this series we have looked at various ways of moving slow, intensive, or blocking tasks off of the UI thread in order to keep our app responsive. The final mechanism that we’ll look at is Android services.
(more…)

DeliciousStumbleUponRedditDiggBookmark/FavoritesShare