A guest blog by C. Enrique Ortiz, a long-time Mobilist and developer advocate who focuses on Android. He is co-creator of Kloc, which helps developers to effortlessly create visually awesome and interactive Developer Portfolios.
In this post we will explore the major changes introduced in Android 4.4. Android 4.4 is the newest version of the Android mobile operating system that was released at the end of October 2013. Also known by the codename KitKat, this version brings a number of very important internal memory-related improvements as well as improvements to the user interface, connectivity support, media and security support, and more.
New API Level
Android 4.4 introduces the new API Level 19. Over 45 API packages were changed including core
graphics and many others. The following six (6) new API packages were introduced:
There are a number of behavioral changes to be aware of including:
- New permissions when reading from external storage.
- If you use
WebView, you need to test your app thoroughly on Android 4.4 images and devices, as there has been significant changes to the code behind web views.
- Due to the new sensor power management in Android 4.4, a few time-related things are affected, in part due to the new batch sensor reading that saves battery life, but adds some variability — alarms won’t be exact in
AlarmManagerunless you use the
setExact()method, and if your app uses
ContentResolverperiodic sync, the time could be off as well (Android documentation indicates around a 4% variability).
For a full list of important behavioral changes see the Android 4.4 about page.
Google claims that the Android 4.4 new memory footprint requirements and management allows Android 4.4 to run in as little as 512MB of RAM. This is a very important improvement that will promote the organic growth of Android — across device vendors and device types, and global markets.
KitKat also provides a new API (
ActivityManager.isLowRamDevice()) that help apps detect if the device s a low RAM device and if so adjust accordingly.
The new version of Android also provides new (
procstats) and improved (
meminfo) memory tools that provide better visibility on memory usage and performance, and how apps are running over time.
New support for NFC Host Card Emulation (HCE) allows for the much needed (and missing) NFC mode that allows Android apps to behave as standard Smartcards by emulating
ISO14443-4 (ISO-DEP) NFC cards that use APDUs for data exchange. HCE is particularly of interest to Developers of payment, access, loyalty and similar apps that interact with standard Smartcard readers. New to NFC are the
OffHostApduService classes. Other new connectivity updates include support for Wi-Fi Tunneled Link Setup (TDLS), support for built-in Infrared transceivers, and new Bluetooth profiles in support of low-power peripherals.
Android 4.4 introduces a number of new changes including the new full-screen mode, a new transition animation framework, translucent system bars, new Notification metadata and listener, and the new accessibility support (
ImageReader API that allows developers to gain direct access to image buffers rendered into a
Surface. A very neat addition is support for closed captions (via WebVTT support) that shows subtitles when playing videos using HTTP Live Stream.
The new printing framework and services allow print manufacturers to define their own print services, and developers to easily add printing capabilities directly into their apps — to print on connected printers over Bluetooth, Wi-Fi or other services.
Starting with Android 4.4, the system allows the end user to select a default messaging app. This “default SMS app” can send messages and receive “deliver action” broadcast actions. The other, non-default SMS apps, can only read messages and receive “received action” broadcast actions. For more information see Getting Your SMS Apps Ready for KitKat.
The new storage access framework simplifies how to browse and open/view documents. New is the document provider that offers read and write access to files stored on a local disk or in a cloud storage service. Developers can integrate with this new framework via Intents versus having to use complex vendor-specific code.
New Sensor Changes
New sensor types and optimizations improves app power consumption via the new hardware sensor batching technique that allows apps to get sensor data in batches versus reading one sensor at a time, resulting in power savings. New sensor types include a step detector and step counter, which is handy for fitness-like applications versus implementing your own step detection algorithms.
New media capabilities include the new screen recording utility, updates to HTTP Live Streaming (HLS), the ability to change playback resolution while streaming, and various Audio-related updates such as audio tunneling to DSP, audio monitoring, loudness enhancer and improved audio timestamps.
Native Development Kit
A new version of the Android NDK (r9b) includes new Renderscript C++ APIs that allow developers to use Renderscript directly from native code. RenderScript comes with new performance optimizations.
On security, Android 4.4 has introduced various changes. From the algorithms perspective, Android 4.4 introduced two new cryptographic algorithms. The first is Elliptic Curve Digital Signature Algorithm (ECDSA), which has been added to the keystore to improve the security of digital signatures. The second is Scrypt key derivation to protect cryptographic keys. Also, the following new app permissions were added:
The Support Library was also updated. New changes include support for external storage APIs, support for the new Printing Framework, drag-and-drop UI support for pop-up menus, accessibility related support, media router changes for media playback and other, and other changes.
For more details about developing Android apps, see the resources below from Safari Books Online.
Not a subscriber? Sign up for a free trial.
Safari Books Online has the content you need
|Expert Android gives you advanced techniques for customizing views, controls, and layouts. You’ll learn to develop apps in record time using JSON, Advanced Form Processing, and the BaaS (Backend As A Service) platform Parse. The book also includes extensive coverage on OpenGL, Search, and Telephony. With these advanced and time saving technologies you’ll be able to release compelling mobile applications in Google Play and the Amazon Appstore at a rapid pace.|
|Embedded Android is for Developers wanting to create embedded systems based on Android and for those wanting to port Android to new hardware, or creating a custom development environment. Hackers and modders will also find this an indispensable guide to how Android works.|
|Android Cookbook helps you find solutions for working with Android user interfaces, multitouch gestures, location awareness, web services, and device features such as the phone, camera, and accelerometer. You also get useful steps on packaging your app for the Android Market.|
About the author
|C. Enrique Ortiz is an industry-recognized Mobilist, Author and Blogger. You can reach Enrique at CEnriqueOrtiz.me. He is co-founder of Kloc, which helps developers to effortlessly create visually awesome and interactive Developer Portfolios. Create your own Developer Portfolio by visiting http://Kloc.me and share with others.|