Thursday 10 March 2016

What's New and Improved(Android N)





1.Multi-Window Support

2.Notification enhancements (Template updates,Bundled notifications,Direct reply and Custom          views)

3.Data Saver

4.Android TV recording

5.Other changes(Network SecurityConfig,ICU4J and Java 8 features)




Multi-Window Support


     
                                                                               



==> In Android N,  introduced a new  multitasking feature into the platform multi-window support.
==> Users can now pop open two apps on the screen at once as above shown.

Notification enhancements


In Android N we've redesigned notifications to make them easier and faster to use. Some of the changes include
  • Template updates: Here updated notification templates to put a new emphasis on hero image and avatar. Developers will be able to take advantage of the new templates with minimal adjustments in their code.
  • Bundled notifications: The system can group messages together, for example by message topic, and display the group. A user can take actions, such as Dismiss or Archive, on them in place. If you’ve implemented notifications for Android Wear, you’ll already be familiar with this model. with this model.
  • Direct reply: For real-time communication apps, the Android system supports inline replies so that users can quickly respond to an SMS or text message directly within the notification interface.
  • Custom views: Two new APIs enable you to leverage system decorations, such as notification headers and actions, when using custom views in notifications.

Data Saver


Over the life of a smartphone, the cost of a cellular data plan can easily exceed the cost of the device itself. In the N Developer Preview, users can enable Data Saver on a device-wide basis in order to use less data, whether roaming, near the end of the billing cycle, or on a small prepaid data pack.
When a user enables Data Saver in Settings and the device is on a metered network, the system blocks background data usage and signals apps to use less data in the foreground wherever possible. Users can whitelist specific apps to allow background metered data usage even when Data Saver is turned on.
The N Developer Preview extends the ConnectivityManager API to provide apps with a way to retrieve the user’s Data Saver preferences and monitor preference changes. It is considered good practice for apps to check whether the user has enabled Data Saver and make an effort to limit foreground and background data usage.

Android TV recording

TV input services let the user pause and resume channel playback via time-shifting APIs. Android N expands on time-shifting by letting the user save multiple recorded sessions.
Users can schedule recordings in advance, or start a recording as they watch a program. Once the system has saved a recording, the user can browse, manage, and play back the recording using the system TV app.
If you want to provide recording functionality for your TV input service, you must indicate to the system that your app supports recording, implement the ability to record programs, handle and communicate any errors that occur during recording, and manage your recorded sessions.

Other changes

     Network Security Config,ICU4J and Java 8 features

Network Security Config:
                          
                         Android N includes a Network Security Configuration feature that lets apps customize their network security settings in a safe, declarative configuration file without modifying app code. These settings can be configured for specific domains and for a specific app. The key capabilities of this feature are as follows:
  • Custom trust anchors: Customize which Certificate Authorities (CA) are trusted for an app's secure connections. For example, trusting particular self-signed certificates or restricting the set of public CAs that the app trusts.
  • Debug-only overrides: Safely debug secure connections in an app without added risk to the installed base.
  • Cleartext traffic opt-out: Protect apps from from accidental usage of cleartext traffic.
  • Certificate pinning: Restrict an app's secure connection to particular certificates.
ICU4J Support:
                     CU4J is an open-source, widely used set of Java libraries providing Unicode and globalization support for software applications. Android N exposes a subset of the ICU4J APIs in the Android framework for app developers to use under the android.icu package. These APIs use localization data present on the device. As a result, you can reduce your APK footprint by not compiling the ICU4J libraries into your APK; instead, you can simply call out to them in the framework. (In this case, you may want to provide multiple versions of your APK, so users running versions of Android lower than Android N can download a version of the app that contains the ICU4J libraries.)
This document begins by providing some basic information on the minimum Android API levels required to support these libraries. It then explains what you need to know about the Android-specific implementation of ICU4J. Finally, it tells you how to use the ICU4J APIs in the Android framework.
Java 8 features:
                     Android N introduces support for Java 8 language features that you can use when developing apps that target Android N. This page describes the new language features supported in the Android N Preview, how to properly set up your project to use them, and any known issues you may encounter.
To start using these features, you need to download and set up Android Studio 2.1 (preview) and the Android N Preview SDK, which includes the required Jack toolchain and updated Android Plugin for Gradle. If you haven't yet installed the Android N Preview SDK, see Set Up to Develop for Android N.
Note: Using the new Java 8 language features is not a requirement for developing apps that target the Android N platform. If you don't want to write code with Java 8 language features, you can keep your project's source and target compatibility values set to Java 7, but you still must compile with JDK 8 to build against the Android N platform.