Google just released the latest version of the Android operating system and a new phone, the Nexus 5, to run it. While the rest of us wait for updates to become available, let's take a look at what's new that might be important to the programmer.
Notice that KitKat is only a decimal point upgrade so don't expect sweeping changes - and let's face it sweeping changes are something we really don't want anyway. At the same time Google has rolled out Google Play Services 4.0 which also adds features.
The changes to the UI are almost by definition "cosmetic". A new font and a launcher combined with transparent status and notification areas make the overall impression seem cleaner. It's not as big a change as Apple's iOS 7, but it is still noticeable.
There is also a new dialer that makes finding a number easier.
The Nexus 5 has an HDR camera mode which takes a number of images at different exposures and puts them together to make a single image. It isn't clear if this is going to be available on other devices.
From the programmer's point of view the biggest new UI feature is the full screen mode. Apps running in full screen display no controls, but the user can drag down to make the menu bar etc visible. This is going to be useful for apps that need the full screen area to display content. You can still access all touch events to provide custom user interaction.
There is also a new animation API - the Transitions Framework. You can use a set of pre-defined transitions or create custom ones to animate scenes, which are view hierarchies. You can also animate the UI on the fly by setting up changes and using the TransitionManager to animate them into view.
Moving away from the UI and graphics there are three big new frameworks.
The printing framework essentially bakes Google Cloud Print into Android - although the documentation does say other services can be used. The system works with Wifi network connections or Bluetooth. There are two printing methods generic and image. A generic document has to be in pdf format and there are new methods to help you create pdf. The image printing methods are designed to work with photos and again there are helper methods to make it easier.
Apart from Google Cloud Print it seems that it is up to printer manufacturers to add the api to their devices. It will be interesting to see if any take up the challenge. One interesting point is that printer services can be advertised through Google Play.
It seems odd that it has taken till 4.4 to get printing setup as a standard service on Android and you could say the same about the storage access framework. Android has long attempted to ignore the fact that files exist and this has often forced users to install third party file managers and the like.
Now we have a built-in file manager of sorts. The new document provider class feeds files to a standard UI component. In principle this means you can browse and access local or network storage files. On the client side you simply have to use the new intents to create or open a document and it automatically opens the standard UI providing access to what looks like a unified file system. As you can probably guess, the default setup is for Google Drive.
The third big addition, NFC Host Card Emulation (HCE), is an attempt to revitalize Google Wallet, which isn't much used for a range of reasons - but mostly that carriers disable it. With HCE any app can emulate an NFC smart card, allowing the user to tap their phone onto the reader in place of a card. The system needs a cloud-based secure element that stores the card details. At the moment, the only such service appears to be that provided by SimplyTapp (the company that first suggested the approach). You can sign up with SimplyTapp to create your own loyalty or store cards and then you can create apps that allow the user to use them. Of course for it to really catch on physical card issuers are going to have to join the club.
These are the major API changes, but Google claims that the organization of the Linux core has changed to make it possible to run in only 512MB of RAM, allowing Android to run on older and less powerful devices. Given the time it takes for a new version to make it onto current phones, the idea that KitKat is going to be appearing on older devices seems unlikely. What is more likely is that Android is now more suitable for cheaper phones and puts it more in competition with alternatives such as Firefox OS.
The system makes use of a range of methods to reduce memory use and there is a new ActivityManager.isLowRamDevice that apps can use to minimize their memory use. There are also new tools to enable you to discover how much memory and resources your app uses.
In an attempt to save battery, hardware sensor batching is used to group together sensor reads. You have to make use of a standard event listener and set the interval between batches - you can also ask for immediate delivery.
On the subject of sensors, there is now support for step detector and step counter sensors. Of course, this depends on the hardware being available in the device and at the moment only the Nexus 5 has the appropriate sensors.
There are also a lot of changes in the area of media, including a new screen recorder which is going to make creating walkthroughs much easier.
A really nice extra that might spark some new type of app, is the IR transmitter API. As long as the device has an IR transmitter, you can now use the API to send remote control style commands. It is still up to you to work out what the code of each command is - so it's is still low level but not as low level as having to modulate the IR transmitter yourself.
There are a lot of other minor changes - consult the full list at Android 4.4.
Google has stated that KitKat will be available for Nexus 4, 7 and 10 in a few weeks. Also expected in the same time frame are the Samsung Galaxy S4 and all HTC One phones.