Sep 01

Google Play services and Firebase for Android will support API level 14 at minimum

Posted by Doug Stevenson, Developer Advocate

Version 10.0.0 of the Google Play services client libraries, as well as the
Firebase client libraries for Android, will be the last version of these
libraries that support Android API
level 9 (Android 2.3, Gingerbread). The next scheduled release of these
libraries, version 10.2.0, will increase the minimum supported API level from 9
to 14 (Android 4.0.1, Ice Cream Sandwich). This change will happen in early
2017.

Why are we discontinuing support for Gingerbread and Honeycomb in Google
Play services?

The Gingerbread platform is almost six years old. Many Android developers have
already discontinued support for Gingerbread in their apps. This helps them
build better apps that make use of the newer capabilities of the Android
platform. For us, the situation is the same. By making this change, we will be
able to provide a more robust collection of tools for Android developers with
greater speed.

What this means for your Android app that uses Google Play services or
Firebase:

You may use version 10.0.0 of Google Play services and Firebase as you are
currently. It will continue to work with Gingerbread devices as it has in the
past.

When you choose to upgrade to the future version 10.2.0, and if your app
minimally supports API level 14 or greater (typically specified as
“minSdkVersion” in your build.gradle), you will not encounter any versioning
problems. However, if your app supports lower than API level 14, you will
encounter a problem at build time with an error that looks like this:

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 14 declared in library [com.google.android.gms:play-services:10.2.0]
        Suggestion: use tools:overrideLibrary="com.google.android.gms:play_services" to force usage

Unfortunately, the stated suggestion will not help you successfully run your app
on older devices. In order to use Google Play services 10.2.0 and later, you
can choose one of the following options:

1. Target API level 14 as the minimum supported API level.

This is the recommended course of action. To discontinue support for API levels
that will no longer receive Google Play services updates, simply increase the
minSdkVersion value in your app’s build.gradle to at least 14. If you update
your app in this way and publish it to the Play Store, users of devices with
less than that level of support will not be able to see or download the update.
However, they will still be able to download and use the most recently published
version of the app that does target their device.

A very small percentage of all Android devices are using API levels less than
14. You can read more about
the current distribution of Android devices. We believe that many of these
old devices are not actively being used.

If your app still has a significant number of users on older devices, you can
use multiple APK support in Google Play to deliver an APK that uses Google Play
services 10.0.0. This is described below.

2. Build multiple APKs to support devices with an API level less than
14.

Along with some configuration and code management, you can build
multiple APKs that support different minimum API levels, with different
versions of Google Play services. You can accomplish this with build
variants in Gradle. First, define build flavors for legacy and newer
versions of your app. For example, in your build.gradle, define two different
product flavors, with two different compile dependencies for the components of
Play Services you’re using:

productFlavors {
    legacy {
        minSdkVersion 9
        versionCode 901  // Min API level 9, v01
    }
    current {
        minSdkVersion 14
        versionCode 1401  // Min API level 14, v01
    }
}

dependencies {
    legacyCompile 'com.google.android.gms:play-services:10.0.0'
    currentCompile 'com.google.android.gms:play-services:10.2.0'
}

In the above situation, there are two product flavors being built against two
different versions of the Google Play services client libraries. This will work
fine if only APIs are called that are available in the 10.0.0 library. If you
need to call newer APIs made available with 10.2.0, you will have to create a
compatibility library for the newer API calls so that they are only built into
the version of the application that can use them:

  • Declare a Java interface that exposes the higher-level functionality you
    want to perform that is only available in current versions of Play services.

  • Build two Android libraries that implement that interface. The “current”
    implementation should call the newer APIs as desired. The “legacy”
    implementation should no-op or otherwise act as desired with older versions of
    Play services. The interface should be added to both libraries.

  • Conditionally compile each library into the app using “legacyCompile” and
    “currentCompile” dependencies.

  • In the app’s code, call through to the compatibility library whenever newer
    Play APIs are required.

After building a release APK for each flavor, you then publish them both to the
Play Store, and the device will update with the most appropriate version for
that device. Read more about multiple
APK support in the Play Store.


Android Developers Blog

Aug 06

Google Play Services 3.2

We’ve just finished rolling out the latest release of Google Play services to devices around the world. It offers better performance and greater power savings, as well as enhancements to the Location Based Services, maps, InstantBuy, Google+, and Photo Sphere.

To simplify your testing, we’ve also released an updated Google APIs emulator image that includes Google Play Services 3.2. You can download the image through the Android SDK Manager.

Maps and Location Based Services

Google Play Services 3.2 includes several enhancements to the Location Based Services. The Fused Location Provider now supports the selection of a low-power mode option when requesting location updates, and the ability to inject mock locations — allowing you to more efficiently test your apps in a variety of simulated conditions.

The geofencing APIs have been updated to support hardware-based GPS geofencing on devices that have supporting hardware, such as the Nexus 4. Hardware geofences consume significantly less battery, and best of all your app will automatically take advantage of this feature on supported hardware without you having to make any changes.

A new Snapshot feature in the maps API lets you capture a bitmap image of the current map in order to improve performance when an interactive map isn’t necessary. We’ve also added a listener to the My Location button.

Google+, Photo Sphere, InstantBuy, and Analytics

If you’ve used Google+ sign-in you can take advantage of the new simplified sharing control that can be embedded directly within your app, simplifying the process of sharing content directly to Google+. We’ve also taken the opportunity to add some butter to the Google+ sign-in animation.

The Photo Sphere viewer has also been extended to include a compass mode that allows users to explore Photo Spheres by moving their phones.

The InstantBuy implementation has been improved to increase efficiency, with improved latency, a cleaner UI with contextual text and assets for the holo light theme, and support for passing through loyalty and offers information.

More About Google Play Services

To learn more about Google Play services and the APIs available to you through it, visit the Google Services area of the Android Developers site.

Join the discussion on

+Android Developers


Android Developers Blog

Aug 03

Barcode Detection in Google Play services

Posted by Laurence Moroney, Developer Advocate

With the release of Google Play services 7.8 we’re excited to announce that we’ve added new Mobile Vision APIs which provides the Barcode Scanner API to read and decode a myriad of different barcode types quickly, easily and locally.

Barcode detection

Classes for detecting and parsing bar codes are available in the com.google.android.gms.vision.barcode namespace. The BarcodeDetector class is the main workhorse — processing Frame objects to return a SparseArray<Barcode> types.

The Barcode type represents a single recognized barcode and its value. In the case of 1D barcode such as UPC codes, this will simply be the number that is encoded in the barcode. This is available in the rawValue property, with the detected encoding type set in the format field.

For 2D barcodes that contain structured data, such as QR codes, the valueFormat field is set to the detected value type, and the corresponding data field is set. So, for example, if the URL type is detected, the constant URL will be loaded into the valueFormat, and the URL property will contain the desired value. Beyond URLs, there are lots of different data types that the QR code can support — check them out in the documentation here.

When using the API, you can read barcodes in any orientation. They don’t always need to be straight on, and oriented upwards!

Importantly, all barcode parsing is done locally, making it really fast, and in some cases, such as PDF-417, all the information you need might be contained within the barcode itself, so you don’t need any further lookups.

You can learn more about using the API by checking out the sample on GitHub. This uses the Mobile Vision APIs along with a Camera preview to detect both faces and barcodes in the same image.

Supported Bar Code Types

The API supports both 1D and 2D bar codes, in a number of sub formats.

For 1D Bar Codes, these are:

AN-13

EAN-8

UPC-A

UPC-E

Code-39

Code-93

Code-128

ITF

Codabar

For 2D Bar Codes, these are:

QR Code

Data Matrix

PDF 417

Learn More

It’s easy to build applications that use bar code detection using the Barcode Scanner API, and we’ve provided lots of great resources that will allow you to do so. Check them out here:

Follow the Code Lab

Read the Mobile Vision Documentation

Explore the sample

Join the discussion on

+Android Developers


Android Developers Blog

Jul 30

Face Detection in Google Play services

Posted by Laurence Moroney, Developer Advocate

With the release of Google Play services 7.8, we announced the addition of new Mobile Vision APIs, which includes a new Face API that finds human faces in images and video better and faster than before. This API is also smarter at distinguishing faces at different orientations and with different facial features facial expressions.

Face Detection

Face Detection is a leap forward from the previous Android FaceDetector.Face API. It’s designed to better detect human faces in images and video for easier editing. It’s smart enough to detect faces even at different orientations — so if your subject’s head is turned sideways, it can detect it. Specific landmarks can also be detected on faces, such as the eyes, the nose, and the edges of the lips.

Important Note

This is not a face recognition API. Instead, the new API simply detects areas in the image or video that are human faces. It also infers from changes in the position frame to frame that faces in consecutive frames of video are the same face. If a face leaves the field of view, and re-enters, it isn’t recognized as a previously detected face.


Detecting a face

When the API detects a human face, it is returned as a Face object. The Face object provides the spatial data for the face so you can, for example, draw bounding rectangles around a face, or, if you use landmarks on the face, you can add features to the face in the correct place, such as giving a person a new hat.

  • getPosition() – Returns the top left coordinates of the area where a face was detected
  • getWidth() – Returns the width of the area where a face was detected
  • getHeight() – Returns the height of the area where a face was detected
  • getId() – Returns an ID that the system associated with a detected face

Orientation

The Face API is smart enough to detect faces in multiple orientations. As the head is a solid object that is capable of moving and rotating around multiple axes, the view of a face in an image can vary wildly.

Here’s an example of a human face, instantly recognizable to a human, despite being oriented in greatly different ways:

The API is capable of detecting this as a face, even in the circumstances where as much as half of the facial data is missing, and the face is oriented at an angle, such as in the corners of the above image.

Here are the method calls available to a face object:

  • getEulerY() – Returns the rotation of the face around the vertical axis — i.e. has the neck turned so that the face is looking left or right [The y degree in the above image]
  • getEulerZ() – Returns the rotation of the face around the Z azis — i.e. has the user tilted their neck to cock the head sideways [The r degree in the above image]

Landmarks

A landmark is a point of interest within a face. The API provides a getLandmarks() method which returns a List , where a Landmark object returns the coordinates of the landmark, where a landmark is one of the following: Bottom of mouth, left cheek, left ear, left ear tip, left eye, left mouth, base of nose, right cheek, right ear, right ear tip, right eye or right mouth.

Activity

In addition to detecting the landmark, the API offers the following function calls to allow you to smartly detect various facial states:

  • getIsLeftEyeOpenProbability() – Returns a value between 0 and 1, giving probability that the left eye is open
  • getIsRighteyeOpenProbability() – Same but for right eye
  • getIsSmilingProbability() – Returns a value between 0 and 1 giving a probability that the face is smiling

Thus, for example, you could write an app that only takes a photo when all of the subjects in the image are smiling.

Learn More

It’s easy to build applications that use facial detection using the Face API, and we’ve provided lots of great resources that will allow you to do so. Check them out here:

Follow the Code Lab

Read the Documentation

Explore the sample


Android Developers Blog

Jul 27

Google Play services 7.8 – Let’s see what’s Nearby!

Posted by Magnus Hyttsten, Developer Advocate, Play services team

Today we’ve finished the roll-out of Google Play services 7.8. In this release, we’ve added two new APIs. The Nearby Messages API allows you to build simple interactions between nearby devices and people, while the Mobile Vision API helps you create apps that make sense of the visual world, using real-time on-device vision technology. We’ve also added optimization and new features to existing APIs. Here are the highlights.

Nearby Messages

Nearby Messages introduces a cross-platform API to find and communicate with mobile devices and beacons, based on proximity. Nearby uses a combination of Bluetooth, Wi-Fi, and an ultrasonic audio modem to connect devices. And it works across Android and iOS. For more info on Nearby Messages, check out the documentation and the launch blog post.

Mobile Vision API

We’re happy to announce a new Mobile Vision API. Mobile Vision has two components.

The Face API allows developers to find human faces in images and video. It’s faster, more accurate and provides more information than the Android FaceDetector.Face API. It finds faces in any orientation, allows developers to find landmarks such as the eyes, nose, and mouth, and identifies faces that are smiling and/or have their eyes open. Applications include photography, games, and hands-free user interfaces.

The Barcode API allows apps to recognize barcodes in real-time, on device, in any orientation. It supports a range of barcodes and can detect multiple barcodes at once. For more information, check out the Mobile Vision documentation.

Google Cloud Messaging

And finally, Google Cloud Messaging – Google’s simple and reliable messaging service – has expanded notification to support localization for Android. When composing the notification from the server, set the appropriate body_loc_key, body_loc_args, title_loc_key, and title_loc_args. GCM will handle displaying the notification based on current device locale, which saves you having to figure out which messages to display on which devices! Check out the docs for more info.

And getting ready for the Android M release, we’ve added high and normal priority to GCM messaging, giving you additional control over message delivery through GCM. Set messages that need immediate users attention to high priority, e.g., chat message alert, incoming voice call alert. And keep the remaining messages at normal priority so that it can be handled in the most battery efficient way without impeding your app performance.

SDK Now Available!

You can get started developing today by downloading the Google Play services SDK from the Android SDK Manager.

To learn more about Google Play services and the APIs available to you through it, visit our documentation on Google Developers.

Join the discussion on

+Android Developers


Android Developers Blog

Jul 18

Google Play services and Firebase for Android will support API level 14 at minimum

Posted by Doug Stevenson, Developer Advocate

Version 10.0.0 of the Google Play services client libraries, as well as the
Firebase client libraries for Android, will be the last version of these
libraries that support Android API
level 9 (Android 2.3, Gingerbread). The next scheduled release of these
libraries, version 10.2.0, will increase the minimum supported API level from 9
to 14 (Android 4.0.1, Ice Cream Sandwich). This change will happen in early
2017.

Why are we discontinuing support for Gingerbread and Honeycomb in Google
Play services?

The Gingerbread platform is almost six years old. Many Android developers have
already discontinued support for Gingerbread in their apps. This helps them
build better apps that make use of the newer capabilities of the Android
platform. For us, the situation is the same. By making this change, we will be
able to provide a more robust collection of tools for Android developers with
greater speed.

What this means for your Android app that uses Google Play services or
Firebase:

You may use version 10.0.0 of Google Play services and Firebase as you are
currently. It will continue to work with Gingerbread devices as it has in the
past.

When you choose to upgrade to the future version 10.2.0, and if your app
minimally supports API level 14 or greater (typically specified as
“minSdkVersion” in your build.gradle), you will not encounter any versioning
problems. However, if your app supports lower than API level 14, you will
encounter a problem at build time with an error that looks like this:

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 14 declared in library [com.google.android.gms:play-services:10.2.0]
        Suggestion: use tools:overrideLibrary="com.google.android.gms:play_services" to force usage

Unfortunately, the stated suggestion will not help you successfully run your app
on older devices. In order to use Google Play services 10.2.0 and later, you
can choose one of the following options:

1. Target API level 14 as the minimum supported API level.

This is the recommended course of action. To discontinue support for API levels
that will no longer receive Google Play services updates, simply increase the
minSdkVersion value in your app’s build.gradle to at least 14. If you update
your app in this way and publish it to the Play Store, users of devices with
less than that level of support will not be able to see or download the update.
However, they will still be able to download and use the most recently published
version of the app that does target their device.

A very small percentage of all Android devices are using API levels less than
14. You can read more about
the current distribution of Android devices. We believe that many of these
old devices are not actively being used.

If your app still has a significant number of users on older devices, you can
use multiple APK support in Google Play to deliver an APK that uses Google Play
services 10.0.0. This is described below.

2. Build multiple APKs to support devices with an API level less than
14.

Along with some configuration and code management, you can build
multiple APKs that support different minimum API levels, with different
versions of Google Play services. You can accomplish this with build
variants in Gradle. First, define build flavors for legacy and newer
versions of your app. For example, in your build.gradle, define two different
product flavors, with two different compile dependencies for the components of
Play Services you’re using:

productFlavors {
    legacy {
        minSdkVersion 9
        versionCode 901  // Min API level 9, v01
    }
    current {
        minSdkVersion 14
        versionCode 1401  // Min API level 14, v01
    }
}

dependencies {
    legacyCompile 'com.google.android.gms:play-services:10.0.0'
    currentCompile 'com.google.android.gms:play-services:10.2.0'
}

In the above situation, there are two product flavors being built against two
different versions of the Google Play services client libraries. This will work
fine if only APIs are called that are available in the 10.0.0 library. If you
need to call newer APIs made available with 10.2.0, you will have to create a
compatibility library for the newer API calls so that they are only built into
the version of the application that can use them:

  • Declare a Java interface that exposes the higher-level functionality you
    want to perform that is only available in current versions of Play services.

  • Build two Android libraries that implement that interface. The “current”
    implementation should call the newer APIs as desired. The “legacy”
    implementation should no-op or otherwise act as desired with older versions of
    Play services. The interface should be added to both libraries.

  • Conditionally compile each library into the app using “legacyCompile” and
    “currentCompile” dependencies.

  • In the app’s code, call through to the compatibility library whenever newer
    Play APIs are required.

After building a release APK for each flavor, you then publish them both to the
Play Store, and the device will update with the most appropriate version for
that device. Read more about multiple
APK support in the Play Store.


Android Developers Blog

May 04

Announcing new SDK versioning in Google Play services and Firebase


Posted by Doug Stevenson, Developer Advocate

Starting today, the Android SDKs for Google Play services and Firebase will be using a new build and versioning scheme. This may require some changes to the way you build your Android app, so be sure to read here thoroughly to get all the details.

Here’s a quick summary of what’s new in these SDKs:

  • All dependencies now use semantic versioning.
  • Each dependency may be updated individually, removing the need to upgrade them all simultaneously in your app.
  • Each dependency has a faster cycle for bug fixes and new features.

Beginning with version 15 of all Play services and Firebase libraries, version numbers adhere to the semantic versioning scheme. As you know, semver is an industry standard for versioning software components, so you can expect that version number changes for each library indicate the amount of change in the library.

Each Maven dependency matching com.google.android.gms:play-services-* and com.google.firebase:firebase-* is no longer required to have the same version number in order to work correctly at build time and at run time. You will be able to upgrade each dependency independently from each other. As such, a common pattern for specifying the shared version number for Play and Firebase dependencies in Gradle builds will no longer work as expected. The pattern (now anti-pattern) looks like this:

buildscript {
    ext {
        play_version = '15.0.0'
    }
}

dependencies {
    // DON'T DO THIS!!
    // The following use of the above buildscript property is no longer valid.
    implementation "com.google.android.gms:play-services-auth:$  {play_version}"
    implementation "com.google.firebase:firebase-auth:$  {play_version}"
    implementation "com.google.firebase:firebase-firestore:$  {play_version}"
}

The above Gradle configuration defines a buildscript property called play_version with the version of the Play and Firebase SDKs, and uses that to declare dependencies. This pattern has been helpful to keep all the dependency versions together, as previously required. However, this pattern no longer applies starting with version 15 for each library. Each dependency that you use may now be at different versions. You can expect that individual library updates may not be released at the same time – they may be updated independently.

In order to support this change in versioning, the Play services Gradle plugin has been updated. If you’re using this plugin, it appears like this at the bottom of build.gradle in your app module:

apply plugin: 'com.google.gms.google-services'

Here is what has changed in this plugin:

  • It checks for compatible versions of Play and Firebase libraries. This is similar to enabling the failOnVersionConflict() ResolutionStrategy.
  • Licensing information is embedded in each individual build artifact. If you use the oss-licenses plugin to manage license requirements, you should update it to the latest.

The first version of this plugin that works with the new versioning system is 3.3.0. When working with the new versions of Play and Firebase libraries, it should be added to your buildscript classpath dependencies as follows:

classpath 'com.google.gms:google-services:3.3.0'

If you’re not using this plugin, but you still want strict version checking of your dependencies, you can apply this new Gradle plugin instead:

apply plugin: 'com.google.android.gms.strict-version-matcher-plugin'

In order to use this plugin, you will also need to add the following to your buildscript classpath, obtained from Google’s Maven Repository:

classpath 'com.google.android.gms:strict-version-matcher-plugin:1.0.0'

If you’re not using Android Studio 3.1 to develop your app, you will need to upgrade in order to get the correct version checking behavior within the IDE. Get the newest version of Android Studio here.

With these changes in place, you are now able to adopt new versions of the various SDKs more freely, without a strict requirement to update everything at once. It also enables the development teams for each SDK to ship fixes and enhancements more quickly. Going forward, you can track the releases for Play services SDKs and Firebase SDKs with the provided links.


Android Developers Blog

Apr 30

Google Play Services 5.0

gps

Google Play services 5.0 is now rolled out to devices worldwide, and it includes a number of features you can use to improve your apps. This release introduces Android wearable services APIs, Dynamic Security Provider and App Indexing, whilst also including updates to the Google Play game services, Cast, Drive, Wallet, Analytics, and Mobile Ads.

Android wearable services

Google Play services 5.0 introduces a set of APIs that make it easier to communicate with your apps running on Android wearables. The APIs provide an automatically synchronized, persistent data store and a low-latency messaging interface that let you sync data, exchange control messages, and transfer assets.

Dynamic security provider

Provides an API that apps can use to easily install a dynamic security provider. The dynamic security provider includes a replacement for the platform’s secure networking APIs, which can be updated frequently for rapid delivery of security patches. The current version includes fixes for recent issues identified in OpenSSL.

Google Play game services

Quests are a new set of APIs to run time-based goals for players, and reward them without needing to update the game. To do this, you can send game activity data to the Quests service whenever a player successfully wins a level, kills an alien, or saves a rare black sheep, for example. This tells Quests what’s going on in the game, and you can use that game activity to create new Quests. By running Quests on a regular basis, you can create an unlimited number of new player experiences to drive re-engagement and retention.

Saved games lets you store a player’s game progress to the cloud for use across many screen, using a new saved game snapshot API. Along with game progress, you can store a cover image, description and time-played. Players never play level 1 again when they have their progress stored with Google, and they can see where they left off when you attach a cover image and description. Adding cover images and descriptions provides additional context on the player’s progress and helps drive re-engagement through the Play Games app.

App Indexing API

The App Indexing API provides a way for you to notify Google about deep links in your native mobile applications and drive additional user engagement. Integrating with the App Indexing API allows the Google Search app to serve up your app’s history to users as
instant Search suggestions, providing fast and easy access to inner pages in your app. The deep links reported using the App Indexing API are also used by Google to index your app’s content and surface them as deep links to Google search result.

Google Cast

The Google Cast SDK now includes media tracks that introduce closed caption support for Chromecast.

Drive

The Google Drive API adds the ability to sort query results, create folders offline, and select any mime type in the file picker by default.

Wallet

Wallet objects from Google take physical objects (like loyalty cards, offers) from your wallet and store them in the cloud. In this release, Wallet adds “Save to Wallet” button support for offers. When a user clicks “Save to Wallet” the offer gets saved and shows up in the user’s Google Wallet app. Geo-fenced in-store notifications prompt the user to show and scan digital cards at point-of-sale, driving higher redemption. This also frees the user from having to carry around offers and loyalty cards.

Users can also now use their Google Wallet Balance to pay for Instant Buy transactions by providing split tender support. With split tender, if your Wallet Balance is not sufficient, the payment is split between your Wallet Balance and a credit/debit card in your Google Wallet.

Analytics

Enhanced Ecommerce provides visibility into the full customer journey, adding the ability to measure product impressions, product clicks, viewing product details, adding a product to a shopping cart, initiating the checkout process, internal promotions, transactions, and refunds. Together they help users gain deeper insights into the performance of their business, including how far users progress through the shopping funnel and where they are abandoning in the purchase process. Enhanced Ecommerce also allows users to analyze the effectiveness of their marketing and merchandising efforts, including the impact of internal promotions, coupons, and affiliate marketing programs.

Mobile Ads

Google Mobile Ads are a great way to monetise your apps and you now have access to better in-app purchase ads. We’ve now added a default implementation for consumable purchases using the Google Play In-app Billing service.

And that’s another release of Google Play services. The updated Google Play services SDK is now available through the Android SDK manager. For details on the APIs, please see New Features in Google Play services 5.0.

Join the discussion on
+Android Developers


Android Developers Blog

Apr 17

New in Android: L Developer Preview and Google Play Services 5.0

By Jamal Eason, Product Manager, Android

Earlier today, at Google I/O, we showed a number of projects we’ve been working on to the thousands of developers in the audience and the millions more tuning in on the livestream. These projects extend Android to the TV (Android TV), to the car (Android Auto) and to wearables (Android Wear), among others.

At Google, our focus is providing a seamless experience for users across all of the screens in their lives. An important component to that is making sure that you as developers have all of the tools necessary to easily deploy your apps across to those screens. Increasingly, Android is becoming the fabric that weaves these experiences together, which is why you’ll be excited about a number of things we unveiled today.

Android L Developer Preview

For the first time since we launched Android, we’re giving you early access to a development version of an upcoming release. The L Developer Preview, available starting tomorrow, lets you explore many of the new features and capabilities of the next version of Android, and offers everything you need to get started developing and testing on the new platform. This is important because the platform is evolving in a significant way — not only for mobile but also moving beyond phones and tablets. Here are a few of the highlights for developers:

  • Material design for the multiscreen world — We’ve been working on a new design language at Google that takes a comprehensive approach to visual, motion, and interaction design across a number of platforms and form factors. Material design is a new aesthetic for designing apps in today’s multi-device world. The L Developer Preview brings material design to Android, with a full set of tools for your apps. The system is incredibly flexible, allowing your app to express its individual character and brand with bold colors and a variety of responsive UI patterns and themeable elements.
  • Enhanced notifications — New lockscreen notifications let you surface content, updates, and actions to users at a glance, without unlocking. Visibility controls let you manage the types of information shown on the lockscreen. Heads-up notifications display content and actions in a small floating window that’s managed by the system, no matter which app is in the foreground. Notifications are material themed and you can express your brand through accent colors and more.
  • Document-centric Recents — Now you can organize your app by tasks and present these concurrently as individual “documents” in the Recents screen. Users can flip through Recents to find the specific task they want and then jump deep into your app with a single tap.
  • Project Volta — New tools and APIs help your app run efficiently and conserve power. Battery Historian is a new tool that lets you visualize power events over time and understand how your app is using battery. A job scheduler API lets you set the conditions under which your background tasks and other jobs should run, such as when the device is idle or connected to an unmetered to a charger, to minimize battery impact.
  • BLE Peripheral Mode — Android devices can now function in Bluetooth Low Energy (BLE) peripheral mode. Apps can use this capability to broadcast their presence to nearby devices — for example, you can now build apps that let a device to function as a pedometer or health monitor and transmit data to another BLE device.
  • Multi-networking — Apps can work with the system to dynamically scan for available networks with specific capabilities and then automatically connect. This is useful when you want to manage handoffs or connect to a specialized network, such as a carrier-billing network.
  • Advanced camera capabilities — A new camera API gives you new capabilities for image capture and processing. On supported devices, your app can capture uncompressed YUV capture at full 8 megapixel resolution at 30 FPS. The API also lets you capture raw sensor data and control parameters such as exposure time, ISO sensitivity, and frame duration, on a per-frame basis.
  • New features for game developers — Support for OpenGL ES 3.1, gives you capabilities such as compute shaders, stencil textures, and texture gather for your games. Android Extension Pack (AEP) is a new set of extensions to OpenGL ES that bring desktop-class graphics to Android. Games will be able to take advantage of tessellation and geometry shaders, and use ASTC texture compression across multiple GPU techonolgies.
  • Android Runtime (ART) — The L Developer Preview introduces the Android Runtime (ART) as the system default. ART offers ahead-of-time (AOT) compilation, more efficient garbage collection, and improved development and debugging features. In many cases it improves performance of the device with no action required by the developer.
  • 64-bit support — The L Developer Preview adds support for 64-bit ABIs, for additional address space and improved performance with certain compute workloads. Apps written in the Java language can run immediately on 64-bit architectures with no modifications required. To support apps using native code, we’re also releasing an updated NDK that includes 64-bit support.

Watch for more details coming out tomorrow (26 June) on what’s in the L Developer Preview and how to get it.

Google Play Services 5.0

Along with the L Developer Preview, we also announced a new version of Google Play services that brings new capabilities and the latest optimizations to devices across the Android ecosystem. Google Play services ensures that you can build on the latest features from Google for your users, with the confidence that those services will work properly everywhere. The latest version has begun rolling out and here are some of the highlights:

  • Services for Android wearables — Your apps can more easily communicate and sync with code running on Android wearables through an automatically synchronized, persistent data store and a reliable messaging interface.
  • Play Games services — Build a great gaming experience with Quests, which allow event-based challenges for players to complete for rewards, Saved Games (a snapshot API allow synchronization of game data along with a cover-image and description), and Game Profile (providing experience points for players).
  • App Indexing API — Surface deep content in your native mobile applications on Google search and drive additional user engagement.
  • Google Cast — Use media tracks to enable closed-caption support for Chromecast.
  • Drive — Sort query results, create offline folders, and select any mime type in the file picker by default.
  • Wallet — Build a “Save to Wallet” button for offers directly into your app; use geo-fenced in-store notifications to prompt the user to show and scan digital cards. Split tender allows payment to be split between Wallet Balance and a credit/debit card in Google Wallet.
  • Analytics — Get insights into the full user journey and understand how different user acquisition campaigns are performing with Enhanced Ecommerce, letting you measure product impressions, product clicks, and more.
  • Mobile Ads — Use improved in-app purchase ads and integrations for the Play store in-app purchase API client.
  • Dynamic Security Provider — Offers an alternative to the platform’s secure networking APIs that can be updated more frequently, for faster delivery of security patches.

We expect the rollout of Google Play services 5.0 to take several days, after which time you’ll be able to get started developing with these new APIs.

Join us at the Google I/O sessions

If you’d like to learn more, join us for sessions on Android development, material design, game development, and more. You’ll find the full session list on the Google I/O 2014 site, and you can filter the schedule to find livestreamed sessions of interest.

Google I/O 2014
I/O Livestreams
I/O Bytes Videos
+Android Developers

Mar 23

Updates to Unity, C++, and iOS tools for Play game services

Posted by Benjamin Frenkel, Product Manager

To further support all you game developers, we’ve updated our popular developer tools to give you a consistent set of game services across platforms for a better, more stable experience, with a particular focus on improvements to the Play game services Unity plugin. In addition, we added support for the Nearby Connections API, launched earlier this year at GDC, to our C++ SDK and Unity plugin.

Let’s take a look a closer look!

Unity plugin feature parity and stability improvements

We’ve added full support for Events and Quests in the Unity plugin. If you’re a Unity developer, you can now incorporate Quests into your games and take full advantage of Player Analytics natively within the Unity IDE.

We’ve also listened to feedback from our community of Unity plugin users and made stability improvements to Play game services Multiplayer, Saved Games, and to sign-in. You’ll now have a much better experience integrating with these Play game services, with fewer crashes and glitches.

C++ SDK and Unity support for the Nearby Connections API

We have added support for the Nearby Connections API to our C++ SDK and Unity plugin. You can now easily build awesome second screen and local multiplayer experiences, like this Beach Bugging Racing example, with the development tools you are most comfortable with.

Easier and more stable iOS builds with CocoaPods

We’ve also made major improvements to our Play game services CocoaPods, which simplify dependency management and building App Store packages from Xcode. The CocoaPods will improve building for iOS with the Play game services iOS and C++ SDKs, and the Unity plugin. We also improved the stability of multiplayer on iOS, eliminating many of the issues around accepting match invitations.

Finally, we improved our support for iOS 8, making it easier to set up multiplayer push notifications, and fixing UI compatibility issues.

Quick links to get you started

Play game services developer page: https://developers.google.com/games/services/

Case studies: http://developer.android.com/distribute/stories/games.html

Downloads

  • C++, iOS, and Java SDKs: https://developers.google.com/games/services/downloads/sdks
  • Unity plugin: https://github.com/playgameservices/play-games-plugin-for-unity
Join the discussion on

+Android Developers


Android Developers Blog