Wednesday, September 3, 2014

Quick glance of Android L features

Android L

Android L is a next version of kitkat, Coming with new designs, features and updates...

Android L is Faster, better looking and more efficient.

Android L is going to change the way it looks with material design- These projects extend Android to the TV (Android TV), to the car (Android Auto) and to wearables (Android Wear), among others.

See the API overview for more information on the rest of the new and updated features. Lets look a quick view of all the API's.


Android Runtime (ART)

  • The new Android runtime (ART) is available on some of the newest Android devices, though all of them currently have Dalvik as the default runtime.
  • App developers should make sure their apps are compatible with ART, especially if you use JNI to run native code or if you use certain tools that produce non-standard code (such as some obfuscators).
  • Addressing Garbage Collection (GC) Issues
  • Improved debugging support
  • Preventing JNI Issues
  • Preventing Stack Size Issues
  • Fixing AOT (ART's Ahead-Of-Time)Compilation Issues
User Interfaces (Material design)

Material design

  • A new theme
  • New widgets for complex views
  • New APIs for custom shadows and animations

Material Theme

The new material theme provides:
  • System widgets that let you set their color palette
  • Touch feedback animations for the system widgets
  • Activity transition animations
The material theme is defined as:
@android:style/Theme.Material (dark version)
@android:style/Theme.Material.Light (light version)

Customize the Color Palette
Customize the Status and Navigation Bar

New Widgets

The Android L Developer Preview includes two new widgets for displaying complex views:

The new RecyclerView widget is a more advanced version of ListView that provides performance improvements for dynamic views and is easier to use.

Animations : Animations for adding and removing items are enabled by default in RecyclerView.

The new CardView widget lets you display important pieces of information inside cards that have a consistent look and feel.

To create a card with a shadow, use the android:elevation attribute

Here's how to specify properties of CardView:
  • To set the corner radius in your layouts, use the card_view:cardCornerRadius attribute.
  • To set the corner radius in your code, use the CardView.setRadius method.
  • To set the background color of a card, use the card_view:cardBackgroundColor attribute.

Views and Shadows

The elevation of a view determines the size of its shadow: views with higher Z values cast bigger shadows. Views only cast shadows on the Z=0 plane under an orthographic projection

View Elevation
Shadows and Outlines
The bounds of a view's background drawable determine the default shape of its shadow.

Clipping Views
clipping views is an expensive operation, don't animate the shape you use to clip a view. To achieve this effect, use a Reveal Effect animation.


Touch Feedback
Reveal Effect
Activity Transitions
Curved Motion
Animating View State Changes
Drawable Tinting
Extracting Colors from an Image


Base Layout

Expanded layouts


Notifications on Android Wear

Bridging notifications

Bridging actions

Heads-up Notification

Ongoing notifications

Ranking and Ordering

On the lockscreen notification

The user decides what shows on the secure lockscreen

Visual changes to notifications as part of material design
Notifications are now available on the device lock screen, yet sensitive content can still be hidden behind it
A new presentation format called Heads-up for receiving high priority notifications while using the device
Cloud-synced notifications - act on a notification on your Android tablet and it is also dismissed on your phone.
And starting now (in Android 4.4W, API Level 20, the platform release for Android Wear), your notifications will bridge to Android Wear devices. You can extend the functionality of notifications on Wear in two different ways. First, you can add speech input and canned responses to Actions on Wear, allowing users to complete tasks from their wrists. Second, you can write Wear apps that hook into your notifications to go even further in terms of creating interactive experiences for users.


Support for OpenGL ES 3.1

adds Java interfaces and native support for OpenGL ES 3.1. Key new functionality provided in OpenGL ES 3.1 includes:
  • Compute shaders
  • Separate shader objects
  • Indirect draw commands
  • Multisample and stencil textures
  • Shading language improvements
  • Extensions for advanced blend modes and debugging
  • Backward compatibility with OpenGL ES 2.0 and 3.0
<uses-feature android:glEsVersion="0x00030001" />

Android Extension Pack

The extension pack supports:
  • Guaranteed fragment shader support for shader storage buffers, images, and atomics (fragment shader support is optional in OpenGL ES 3.1.)
  • Tessellation and geometry shaders
  • ASTC (LDR) texture compression format
  • Per-sample interpolation and shading
  • Different blend modes for each color attachment in a frame buffer


Camera API for advanced camera capabilities

New android.hardware.camera2 API to facilitate fine-grain photo capture and image processing.

Now programmatically access the camera devices available to the system with CameraManager.getCameraIdList() and connect to a specific device withCameraManager.openCamera(). To start capturing images, create a CameraCaptureSession and specify theSurface objects for the captured images. The CameraCaptureSession can be configured to take single shots or multiple images in a burst.

Audio playback

changes in AudioTrack

Media playback control

We can now build our own media controller app with the new, which provides simplified transport controls APIs that replace those in RemoteControlClient.


Directory selection

Storage Access Framework

The SAF includes the following:
Document provider—A content provider that allows a storage service (such as Google Drive) to reveal the files it manages. A document provider is implemented as a subclass of theDocumentsProvider class. The document-provider schema is based on a traditional file hierarchy, though how your document provider physically stores data is up to you. The Android platform includes several built-in document providers, such as Downloads, Images, and Videos.
Client app—A custom app that invokes theACTION_OPEN_DOCUMENT and/or ACTION_CREATE_DOCUMENT intent and receives the files returned by document providers.
Picker—A system UI that lets users access documents from all document providers that satisfy the client app's search criteria.
Some of the features offered by the SAF are as follows:
Lets users browse content from all document providers, not just a single app.
Makes it possible for your app to have long term, persistent access to documents owned by a document provider. Through this access users can add, edit, save, and delete files on the provider.
Supports multiple user accounts and transient roots such as USB storage providers, which only appear if the drive is plugged in.

Wireless & Connectivity

Multiple network connections

New multi-networking APIs
These let your app dynamically scan for available networks with specific capabilities, and establish a connection to them. This is useful when your app requires a specialized network, such as an SUPL, MMS, or carrier-billing network, or if you want to send data using a particular type of transport protocol.

Bluetooth broadcasting

An Android device can now act as a Bluetooth LE peripheral device.

The new android.bluetooth.le APIs enable your apps to broadcast advertisements, scan for responses, and form connections with nearby BLE devices. You must add the android.permission.BLUETOOTH_ADMINpermission in your manifest in order for your app to use the new advertising and scanning features.

NFC enhancements

enhancements to enable wider and more flexible use of NFC:
  • Android Beam is now available in the share menu.
  • Your app can invoke the Android Beam on the user’s device to share data by callingandroid.nfc.NfcAdapter.invokeBeam(). This avoids the need for the user to manually tap the device against another NFC-capable device to complete the data transfer.
  • You can use the new android.nfc.NdefRecord.createTextRecord() method to create an NDEF record containing UTF-8 text data.
  • If you are developing a payment app, you now have the ability to register an NFC application ID (AID) dynamically by calling android.nfc.cardemulation.CardEmulation.registerAidsForService(). You can also use android.nfc.cardemulation.CardEmulation.setPreferredService() to set the preferred card emulation service that should be used when a specific activity is in the foreground.
Power Efficiency

Scheduling jobs

New API that lets you optimize battery life by defining jobs for the system to run asynchronously at a later time or under specified conditions (such as when the device is charging).

Developer tools for power measurement

Battery Historian


Managed provisioning

device administrator can initiate a managed provisioning process to add a co-present but separate managed profile to a device, if the user has an existing personal account. Apps that are associated with managed profiles will appear alongside non-managed apps in the user’s Launcher, Recent apps screen, and notifications.

Task locking

A new task locking API that lets you temporarily restrict users from leaving your app or being interrupted by notifications
Printing Framework

Render PDF as bitmap

We can now render PDF document pages into bitmap images for printing by using the class. You must specify a ParcelFileDescriptor that is seekable (that is, the content can be randomly accessed) on which the system writes the the printable content. Your app can obtain a page for rendering with openPage(), then call render() to turn the opened PdfRenderer.Page into a bitmap.
Testing & Accessibility

Testing and accessibility improvements

We can execute shell commands from your instrumentation test

We can use the new android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction to define standard or customized actions to perform on an AccessibilityNodeInfo.


Easier switching between input languages

Users can more easily switch between all input method editors (IME)supported by the platform. 
Manifest Declarations
Declares that your app must be installed only on devices that support the Android TV user interface.

<uses-feature android:name=""
android:required="true" />
Declares that your app must only be installed on devices that fully implement theandroid.webkit.* APIs.

<uses-feature android:name=""
android:required="true" />

No comments :

Post a Comment