Android 5 – Features

Standard

Game Devs

https://www.youtube.com/watch?v=qW3Ufg1JNRE&src_vid=z0Pjm7l-VAE&feature=iv&annotation_id=annotation_2310872119

Camera2

https://www.youtube.com/watch?v=w_T964XgYY0&list=PLiGzvgwA5Gmg5EovEGdPo5SaFv741NdHx&index=21

Android Work

https://www.youtube.com/watch?v=FbVWtYPpzIs&src_vid=z0Pjm7l-VAE&feature=iv&annotation_id=annotation_3761110971

ART

Ahead-of-time (AOT) compilation

ART introduces ahead-of-time (AOT) compilation, which can improve app performance. ART also has tighter install-time verification than Dalvik.

At install time, ART compiles apps using the on-device dex2oat tool. This utility accepts DEX files as input and generates a compiled app executable for the target device. The utility should be able to compile all valid DEX files without difficulty. However, some post-processing tools produce invalid files that may be tolerated by Dalvik but cannot be compiled by ART. For more information, see Addressing Garbage Collection Issues.

http://source.android.com/devices/tech/dalvik/art.html

Bluetooth low energy

https://www.youtube.com/watch?v=2fZThdNbHcQ&src_vid=z0Pjm7l-VAE&feature=iv&annotation_id=annotation_1014945263

Notifications

https://www.youtube.com/watch?v=EHTU5CxhoZ4&list=PLiGzvgwA5Gmg5EovEGdPo5SaFv741NdHx&index=22

Project Volta

In addition to new features, Android 5.0 emphasizes improvements in battery life. Use the new APIs and tool to understand and optimize your app’s power consumption.

Scheduling jobs

Android 5.0 provides a new JobScheduler 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). Job scheduling is useful in such situations as:

  • The app has non-user-facing work that you can defer.
  • The app has work you’d prefer to do when the unit is plugged in.
  • The app has a task that requires network access or a Wi-Fi connection.
  • The app has a number of tasks that you want to run as a batch on a regular schedule.

A unit of work is encapsulated by a JobInfo object. This object specifies the scheduling criteria.

Use the JobInfo.Builder class to configure how the scheduled task should run. You can schedule the task to run under specific conditions, such as:

  • Start when the device is charging
  • Start when the device is connected to an unmetered network
  • Start when the device is idle
  • Finish before a certain deadline or with a minimum delay

For example, you can add code like this to run your task on an unmetered network:

JobInfo uploadTask = new JobInfo.Builder(mJobId,

                                         mServiceComponent /* JobService component */)

        .setRequiredNetworkCapabilities(JobInfo.NetworkType.UNMETERED)

        .build();

JobScheduler jobScheduler =

        (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);

jobScheduler.schedule(uploadTask);

If the device has stable power (that is, it has been plugged in for more than 2 minutes and the battery is at a healthy level), the system will run any scheduled job that is ready to run, even if the job’s deadline has not expired.

To see an example of how to use the JobScheduler API, refer to the JobSchedulerSample implementation sample in this release.

Further informations:

https://www.youtube.com/watch?v=KzSKIpJepUw&src_vid=z0Pjm7l-VAE&feature=iv&annotation_id=annotation_2061316563

Printing Framework

Render PDF as bitmap

You can now render PDF document pages into bitmap images for printing by using the new PdfRenderer 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. You can also set additional parameters if you only want to convert a portion of the document into a bitmap image (for example, to implement tiled rendering to zoom in on the document).

For an example of how to use the new APIs, see the PdfRendererBasic sample.

I’ve collected these informations from:

http://developer.android.com/about/versions/android-5.0.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s