Android 4.4 KitKat The Programmers Take
Written by Harry Fairhead   
Friday, 01 November 2013

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.

andoidUI2

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.

 

 

androidUI

 

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.

 

andoidfullscreen

 

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.   

 

androidfiles

 

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. 

simplytap

 

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 is also really big update, but one that will only affect you if you are creating hybrid apps or using PhoneGap. The WebView class now makes use of Chromium for its HTML rendering and the V8 engine to run JavaScript. This should make HTML applications run much faster and offers the chance for them to feel more like native apps. 

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. 

 

 

 andoidUI2

 

More Information

KitKat

Android 4.4 APIs

SimplyTap

 

Related Articles

Android Overtakes iOS In Tablet Market

Android Passes 1 Billion Activations

Surprise Android 4.4 Is KitKat

Android Fragmentation Visualized

A New Dawn - Google's Android IDE

Android Adventures - Getting Started With Android Studio

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

Banner


Pico 2W Announced But There Is A Surprise!
25/11/2024

Raspberry Pi released the Pico 2 a few months ago and we have been waiting for the Pico 2W since then. But Pimoroni beat them to the draw with the Pico Plus 2W based on the RM2 radio module and hinted [ ... ]



Fermyon's Spin WebAssembly Version 3.0 Released
26/11/2024

The open source developer tool for building, distributing, and running serverless WebAssembly applications reaches version 3.0. What's new?


More News

 

 

Last Updated ( Friday, 01 November 2013 )