6 Tasty Android L Treats for the Developer’s Sweet Tooth
Azoft Blog 6 Tasty Android L Treats for the Developer’s Sweet Tooth

6 Tasty Android L Treats for the Developer’s Sweet Tooth

By Anna Orlova on June 30, 2014

“The Next Sweet Thing”: 6 Tasty Android L Treats Whether it stands for ‘Lollipop’ or ‘Lemon Pie’ – or whatever “The Next Sweet Thing” is going to be – ‘L’ is introducing sweeping enhancements in both design and performance to the Android mobile platform. Although the official release is still several months away, the L Developer Preview, in typical fashion, allows for experimentation with new features while as well presenting challenges of compatibility with previous Android versions.

Caution: Most of the features below are only available to apps running on devices with the Android L Developer Preview OS installed and are not compatible with currently released Android versions. To make your app run on previous releases, it is necessary to code in an alternative option to L-specific features. And even if you do, it's recommended that you not publish such apps in the Google Play Store.

At Azoft, we've just begun exploring the new capabilities of L – and here we highlight the five features that we're the most excited about so far:

1. Material design

The concept of material design – cross-platform-and-cross-device interaction design – is far-reaching – and not easily defined. As writes Google, it's “a visual language that synthesizes classic principles of good design.”

So far, I’ve found three cool and highly-distinctive features for developers among the new components and functionality available: widgets; new activity transitions & button animations; and shadows.

Widgets

Widgets are the best part. Android L Developer Preview offers two new widgets for displaying complex views: RecyclerView and CardView.

  • RecyclerView updates and replaces ListView. It's claimed to be easier to use and feature performance improvements in dynamic views.

list mail
Image source: developer.android.com

  • CardView allows for the display of data blocks inside cards. The results look svelte in the preview.

card travel
Image source: developer.android.com

Both widgets are included in the Android L Developer Preview Support library and are thus available in previous Android releases as well, yet with two significant limitations in CardView whereas:

  • it falls back to a programmatic shadow implementation using additional padding
  • it doesn’t clip intersecting child views with rounded corners

Animation

Along with some additional default animations for action button transitions, there have been haptic touch feedback enhancements in the UI controls as well as view-state changes appearing in Android L – and the new APIs enable you to customize them or create new ones.

See more info.

Shadows

Google has added a ‘Z’ property – the elevation of a view – to views in Android L, so developers can now customize the size of a shadow: the higher the Z value, the wider the shadow that a view casts. Additionally, the drawing order can be arranged so that views with higher Z values supercede others.

layeringImage source: googledevelopers.blogspot.ru

Read more.

2. Enhanced notifications

With a strong emphasis on ‘Googleware’ – which does nothing but notify – Android L brings a few enhancements to notifications.

1. Google has made them white and added shadows, and has introduced a series of other visual modifications to the layout design.

Basic
Image source: developer.android.com

2. Now there are options to have all notifications displayed on the device lock screen, just some of them, or none (for increased security): developers can control this via the SystemUI visibility level.

The current version allows three visibility values: public, private, and secret:

LockScreen
Image source: developer.android.com

More reading.

3. A new presentation format has been added for creating high-priority notifications that will appear even while the device is in use.

Headsup
Image source: developer.android.com

3. New Android Runtime (ART)

Replacing Dalvik as the default runtime in Android L, the ART that we became familiar with in 4.4 comes with additional features:

  • AOT (Ahead-of-Time) Compilation
  • Improved garbage collection
  • Development & debugging improvements: support for SamplingProfiler; more debugging features; and more in-depth diagnostic details are provided in Exceptions and Crash Reports

Here's more.

Caution: While most previously published Android apps should work without changes under ART as the default runtime, apps that use Java Native Interface to run C/C++ code might be effected. The issues might also arise if you use dev tools that generate non-standard code (e.g obfuscators) or use techniques that are incompatible with compacting garbage collection. Please see Verifying App Behavior on Android Runtime for more info.

4. New Camera API

We've waited a long time for this one, as all previous APIs didn't really work very well. Finally, we've got the new android.hardware.camera2 API which features a considerable increase in performance: the fully synchronized pipeline model allows the Camera 2 system to produce full resolution images simultaneously with the hardware capturing them.

Moreover, many the following features that previously required writing third-party scripts or using other roundabout methods, are now available via official APIs:

  • HDR+
  • Digital Negative format (alternative to RAW)
  • The Burst mode
  • Full manual control: exposure time, ISO sensitivity, frame duration, lens focus distance, etc.

Besides, if in previous Android versions OEMs could limit access to camera functions, in Android L only hardware will be the limit.

5. New Printing Framework

Finally – native PDF rendering! A huge improvement for anybody who writes apps that work with PDFs is the new android.graphics.pdf.PdfRenderer class. The class allows for the rendering of PDF documents as bitmap images for optimum printing quality. Now developers are not pressed to use any third-party viewers. Great news.

6. Support for OpenGL ES 3.1

Android L features native support for OpenGL ES 3.1 with Java interface provided with GLES31. The key functionality includes:

  • Compute shaders
  • Separate shader objects
  • Indirect draw commands
  • Multisample and stencil textures
  • Shading language improvements
  • Extensions for advanced blend modes and debugging

OpenGL ES 3.1 is backwards-compatible with OpenGL ES 2.0 and 3.0.

And, that’s all for now, folks… Of course, there are several other promising features left to cover, such as Project Volta for example, that we may return in another post soon…

Co-author: Alexey Vasilkov, senior Android developer at Azoft

VN:F [1.9.22_1171]
Rating: 4.2/5 (13 votes cast)
VN:F [1.9.22_1171]
Rating: +10 (from 10 votes)
6 Tasty Android L Treats for the Developer’s Sweet Tooth, 4.2 out of 5 based on 13 ratings



Request a Free Quote
 
 
 

Please enter the result and submit the form

Content created by Anna Orlova