Android, the world's most popular mobile platform



Download 449.13 Kb.
Page5/13
Date20.06.2017
Size449.13 Kb.
#21208
1   2   3   4   5   6   7   8   9   ...   13

New Developer Features



Unified UI framework for phones, tablets, and more


Android 4.0 brings a unified UI framework that lets developers create elegant, innovative apps for phones, tablets, and more. It includes all of the familiar Android 3.x interface elements and APIs — fragments, content loaders, Action Bar, rich notifications, resizable home screen widgets, and more — as well as new elements and APIs.

For developers, the unified UI framework in Android 4.0 means new UI tools, consistent design practices, simplified code and resources, and streamlined development across the range of Android-powered devices.


Key Honeycomb developer features, now for phones too

Core UI


  • Fragments and content loaders

  • Resizeable home screen widgets

  • Rich notifications

  • Multi-selection, drag-drop, clipboard

  • Improved screen-support API

  • Hardware-accelerated 2D graphics

Graphics and animation

  • Property-based animation

  • Renderscript 3D graphics

Media and connectivity

  • HTTP Live streaming

  • Bluetooth A2DP and HSP devices

  • Support for RTP

  • MTP/PTP file transfer

  • DRM framework

  • Input from keyboard, mouse, gamepad, joystick

Enterprise

  • Full device encryption

  • DPM policies for encrypted storage and passwords


Communication and sharing


Android 4.0 extends social and sharing features to any application on the device. Applications can integrate contacts, profile data, stream items, and calendar events from any of the user’s activities or social networks.

Social API

A shared social provider and API provide a new unified store for contacts, profile data, stream items, and photos. Any app or social network with user permission can contribute raw contacts and make them accessible to other apps and networks. Applications with user permission can also read profile data from the provider and display it in their applications.

The social API lets applications store standard contact data as well as new types of content for any given contact, including large profile photos, stream items, and recent activity feedback. Recent activity feedback is a standard way for applications to “tag” a contact with common activity, such as when the user calls the contact or sends an email or SMS message. The social provider uses the recent activity feedback as a new signal in ranking, such as for name auto-complete, to keep the most relevant contacts ranked closest to the top.

Applications can also let users set up a social connection to a contact from the People app. When the user touches Add Connection in a contact, the app sends a public intent that other apps can handle, displaying any UI needed to create the social connection.

Building on the social API, developers can add powerful new interactions that span multiple social networks and contacts sources.

Calendar API

A shared calendar content provider and framework API make it easier for developers to add calendar services to their apps.

With user permission, any application can add events to the shared database and manage dates, attendees, alerts, and reminders. Applications can also read entries from the database, including events contributed by other applications, and handle the display of event alerts and reminders. Using the calendar provider, applications can take advantage of event data sourced from a variety of apps and protocols, to offer innovative ways of viewing and managing a user’s events. Apps can also use calendar data to improve the relevance of their other content.

For lighter-weight access to calendar services, the Calendar app defines a set of public Intents for creating, viewing, and editing events. Rather than needing to implement a calendar UI and integrate directly with the calendar provider, applications can simply broadcast calendar Intents. When the Calendar app receives the Intents, it launches the appropriate UI and stores any event data entered. Using calendar Intents, for example, apps can let users add events directly from lists, dialogs, or home screen widgets, such as for making restaurant reservations or booking time with friends.

Visual voicemail API

A shared Voicemail provider and API allow developers to build applications that contribute to a unified voicemail store. Voicemails are displayed and played in the call log tab of the platform’s Phone app.

Android Beam

Android Beam is an NFC-based feature that lets users instantly share information about the apps they are using, just by touching two NFC-enabled phones together. When the devices are in range — within a few centimeters — the system sets up an NFC connection and displays a sharing UI. To share whatever they are viewing with the other device, users just touch the screen.

For developers, Android Beam is a new way of triggering almost any type of proximity-based interaction. For example, it can let users instantly exchange contacts, set up multiplayer gaming, join a chat or video call, share a photo or video, and more. The system provides the low-level NFC support and the sharing UI, while the foreground app provides lightweight data to transfer to the other device. Developers have complete control over the data that is shared and how it is handled, so almost any interaction is possible. For larger payloads, developers can even use Android Beam to initiate a connection and transfer the data over Bluetooth, without the need for user-visible pairing.

Even if developers do not add custom interactions based on Android Beam they can still benefit from it being deeply integrated into Android. By default the system shares the app’s Google Play URL, so it’s easy for the user to download or purchase the app right away.

Modular sharing widget

The UI framework includes a new widget, ShareActionProvider, that lets developers quickly embed standard share functionality and UI in the Action Bar of their applications. Developers simply add ShareActionProvider to the menu and set an intent that describes the desired sharing action. The system handles the rest, building up the list of applications that can handle the share intent and dispatching the intent when the user chooses from the menu.


New media capabilities


Low-level streaming multimedia

Android 4.0 provides a direct, efficient path for low-level streaming multimedia. The new path is ideal for applications that need to maintain complete control over media data before passing it to the platform for presentation. For example, media applications can now retrieve data from any source, apply proprietary encryption/decryption, and then send the data to the platform for display.

Applications can now send processed data to the platform as a multiplexed stream of audio/video content in MPEG-2 transport stream format. The platform de-muxes, decodes, and renders the content. The audio track is rendered to the active audio device, while the video track is rendered to either a Surface or a SurfaceTexture. When rendering to a SurfaceTexture, the application can apply subsequent graphics effects to each frame using OpenGL.

To support this low-level streaming, the platform introduces a new native API based on Khronos OpenMAX AL 1.0.1. The API is implemented on the same underlying services as the platform’s existing OpenSL ES API, so developers can make use of both APIs together if needed. Tools support for low-level streaming multimedia will be available in an upcoming release of the Android NDK.

New camera capabilities

Developers can take advantage of a variety of new camera features in Android 4.0. ZSL exposure, continuous focus, and image zoom let apps capture better still and video images, including during video capture. Apps can even capture full-resolution snapshots while shooting video. Apps can now set custom metering regions in a camera preview, then manage white balance and exposure dynamically for those regions. For easier focusing and image processing, a face-detection service identifies and tracks faces in a preview and returns their screen coordinates.

Media effects for transforming images and video

A set of high-performance transformation filters let developers apply rich effects to any image passed as an OpenGL ES 2.0 texture. Developers can adjust color levels and brightness, change backgrounds, sharpen, crop, rotate, add lens distortion, and apply other effects. The transformations are processed by the GPU, so they are fast enough for processing image frames loaded from disk, camera, or video stream.

Audio remote controls

Android 4.0 adds a new audio remote control API that lets media applications integrate with playback controls that are displayed in a remote view. Media applications can integrate with a remote music playback control that’s built into in the platform’s lock screen, allowing users to control song selection and playback without having to unlock and navigate to the music app.

Using the audio remote control API, any music or media app can register to receive media button events from the remote control and then manage play state accordingly. The application can also supply metadata to the remote control, such as album art or image, play state, track number and description, duration, genre, and more.

New media codecs and containers

Android 4.0 adds support for additional media types and containers to give developers access to the formats they need. For high-quality compressed images, the media framework adds support for WebP content. For video, the framework now supports streaming VP8 content. For streaming multimedia, the framework supports HTTP Live streaming protocol version 3 and encoding of ADTS-contained AAC content. Additionally, developers can now use Matroska containers for Vorbis and VP8 content.

New types of connectivity


Wi-Fi P2P

Developers can use a framework API to discover and connect directly to nearby devices over a high-performance, secure Wi-Fi peer-to-peer (P2P) connection. No internet connection or hotspot is needed. Android's Wi-Fi P2P framework complies with the Wi-Fi Alliance's Wi-Fi Direct™ certification program.

Wi-Fi peer-to-peer (P2P) opens new opportunities for developers to add innovative features to their applications. Applications can use Wi-Fi P2P to share files, photos, or other media between devices or between a desktop computer and an Android-powered device. Applications could also use Wi-Fi P2P to stream media content from a peer device such as a digital television or audio player, connect a group of users for gaming, print files, and more.

Bluetooth Health Device Profile (HDP)

Developers can now build powerful medical applications that use Bluetooth to communicate with wireless devices and sensors in hospitals, fitness centers, homes, and elsewhere. Applications can collect and manage data from HDP source devices and transmit it to backend medical applications such as records systems, data analysis services, and others.

Using a framework API, applications can use Bluetooth to discover nearby devices, establish reliable or streaming data channels, and manage data transmission. Applications can supply any IEEE 11073 Manager to retrieve and interpret health data from Continua-certified devices such as heart-rate monitors, blood meters, thermometers, and scales.


New UI components and capabilities


Layout enhancements

A new layout, GridLayout, improves the performance of Android applications by supporting flatter view hierarchies that are faster to layout and render. Because hierarchies are flatter, developers can also manage alignments between components that are visually related to each other even when they are not logically related, for precise control over application UI. GridLayout is also specifically designed to be configured by drag-and-drop design tools such as the ADT Plug-in for Eclipse.

OpenGL ES texture views

A new TextureView object lets developers directly integrate OpenGL ES textures as rendering targets in a UI hierarchy. The object lets developers display and manipulate OpenGL ES rendering just as they would a normal view object in the hierarchy, including moving, transforming, and animating the view as needed. The TextureView object makes it easy for developers to embed camera preview, decoded video, OpenGL game scenes, and more. TextureView can be viewed as a more powerful version of the existing SurfaceView object, since it offers the same benefits of access to a GL rendering surface, with the added advantage of having that surface participate fully in the normal view hierarchy.

Hardware-accelerated 2D drawing

All Android-powered devices running Android 4.0 are required to support hardware-accelerated 2D drawing. Developers can take advantage of this to add great UI effects while maintaining optimal performance on high-resolution screens, even on phones. For example, developers can rely on accelerated scaling, rotation, and other 2D operations, as well as accelerated UI components such as TextureView and compositing modes such as filtering, blending, and opacity.


New input types and text services


Stylus input, button support, hover events

Android 4.0 includes full support for stylus input events, including tilt and distance axes, pressure, and related motion event properties. To help applications distinguish motion events from different sources, the platform adds distinct tool types for stylus, finger, mouse, and eraser. For improved input from multi-button pointing devices, the platform now provides distinct primary, secondary, and tertiary buttons, as well as back and forward buttons. Hover-enter and hover-exit events are also added, for improved navigation and accessibility. Developers can build on these new input features to add powerful interactions to their apps, such as precise drawing and gesturing, handwriting and shape recognition, improved mouse input, and others.

Text services API for integrating spelling checkers

Android 4.0 lets applications query available text services such as dictionaries and spell checkers for word suggestions, corrections, and similar data. The text services are external to the active IME, so developers can create and distribute dictionaries and suggestion engines that plug into the platform. When an application receives results from a text service — for example, word suggestions — it can display them in a dedicated suggestion popup window directly inside the text view, rather than relying on the IME to display them.


Enhanced accessibility APIs


Android 4.0 adds new accessibility features and an enhanced API to let developers improve the user experience in their apps, especially on devices that don’t have hardware buttons. For accessibility services such as screen readers in particular, the platform offers new APIs to query window content, for easier navigation, better feedback, and richer user interfaces.

Accessibility API

To let applications manage interactions more effectively when accessibility features are enabled, the platform adds accessibility events for explore-by-touch mode, scrolling, and text selection. For these and other events, the platform can attach a new object called an accessibility record that provides extra information about the event context.

Using the accessibility record and related APIs, applications can now access the view hierarchy associated with an event. Applications can query for key properties such as parent and child nodes, available states, supported actions, screen position, and more. Applications can also request changes to certain properties to help manage focus and selected state. For example, an accessibility service could use these new capabilities to add convenient features such as screen-search by text.

Text-to-speech API

A new framework API lets developers write text-to-speech engines and make them available to any app requesting TTS capabilities.


Efficient network usage


In Android 4.0, users can see how much network data their running apps are using. They can also set limits on data usage by network type and disable background data usage for specific applications. In this context, developers need to design their apps to run efficiently and follow best practices for checking the network connection. Android 4.0 provides network APIs to let applications meet those goals.

As users move between networks or set limits on network data, the platform lets applications query for connection type and availability. Developers can use this information to dynamically manage network requests to ensure the best experience for users. Developers can also build custom network and data-usage options into their apps, then expose them to users directly from Settings by means of a new system Intent.


Security for apps and content


Secure management of credentials

Android 4.0 makes it easier for applications to manage authentication and secure sessions. A new keychain API and underlying encrypted storage let applications store and retrieve private keys and their corresponding certificate chains. Any application can use the keychain API to install and store user certificates and CAs securely.

Address Space Layout Randomization

Android 4.0 now provides address space layout randomization (ASLR) to help protect system and third party applications from exploitation due to memory-management issues.


Enhancements for Enterprise


VPN client API

Developers can now build or extend their own VPN solutions on the platform using a new VPN API and underlying secure credential storage. With user permission, applications can configure addresses and routing rules, process outgoing and incoming packets, and establish secure tunnels to a remote server. Enterprises can also take advantage of a standard VPN client built into the platform that provides access to L2TP and IPSec protocols.

Device policy management for camera

The platform adds a new policy control for administrators who manage devices using an installed Device Policy Manager. Administrators can now remotely disable the camera on a managed device for users working in sensitive environments.



Download 449.13 Kb.

Share with your friends:
1   2   3   4   5   6   7   8   9   ...   13




The database is protected by copyright ©ininet.org 2024
send message

    Main page