Skip to main content

New Face Detection, Barcode Scanning, GCM And Nearby APIs Come To Google Play Services 7.8

The latest Google Play Services 7.8 update became available a month ago and has just finished rolling out. In it, Google introduced a new Face Detection API, a Barcode detection API (both part of the Mobile Vision API bundle), an improved Google Cloud Messaging (GCM) API, and a "Nearby" API for interactions between people and objects situated in proximity to each other.

Face Detection

The new Face Detection API introduced in the latest Play Services update is much improved over the previous one. It allows detection of faces even at different orientations and can recognize different "landmarks" on the face, such as the nose, lips, eyes, and so on.

Google made sure to note that this is not a facial recognition API, which would imply recognizing certain individuals in photographs. The API detects only if there's a face in an image or a video. If a face is detected and then leaves the field of view, it won't be recognized as the same face by the algorithm once it re-enters the field of view.

The API offers certain function calls that allow developers to detect certain facial states, so they could build a camera app that detects when everyone in the photo is smiling, and then make it take the shot automatically.

Barcode Scanning

As part of the Mobile Vision bundle, Google introduced the Barcode scanning functionality, which can detect either one-dimensional barcodes such as product barcodes, or two-dimensional ones such as QR codes. There are multiple types of 1D and 2D that the new Barcode API supports:

  • 1D barcodes: EAN-13, EAN-8, UPC-A, UPC-E, Code-39, Code-93, Code-128, ITF, Codabar
  • 2D barcodes: QR Code, Data Matrix, PDF-417

The barcode scanning functionality has long been relegated to the third-party "Barcode Scanner" app in the Play Store, but now Google has finally implemented it into Play Services, which is a core component of most Android phones.

Google Cloud Messaging

Google's Cloud Messaging API can send messages from other applications to devices, and in the new Play Services update it has also gained the ability to create notifications for different locales. This should help developers figure out which messages should display to which devices.

On Android M, developers will also gain the ability to set the messages to "Normal" and "High" priority. Normal allows the GCM API to bundle multiple messages and delay their arrival in order to not wake up the smartphone's CPU and consume battery life. Google recommends developers use the Normal priority for things such as email notifications or other data that needs to be synced.

In the High priority mode, messages such as chat alerts or incoming phone calls are received right away. Google recommends using this priority mode only for time-critical GCM messages, as otherwise the battery life of the users' smartphones will suffer.

Nearby

The Nearby API uses a combination of Wi-Fi, Bluetooth or inaudible sound through your speaker and microphone to determine proximity to other devices. If developers enable this functionality, people who are close to each other and use the same app can share various things with each other directly, without using another third-party app. For instance, in the image above you can see that Pocket Cats users in proximity with each other can discover whether they listen to the same podcasts.

Google promised the Nearby API a month ago, and at the time the SDK wasn't yet available to developers, but now it's finally here (available for download in the SDK manager).

Follow us @tomshardware, on Facebook and on Google+.

Lucian Armasu is a Contributing Writer for Tom's Hardware US. He covers software news and the issues surrounding privacy and security.