Google Play Services was introduced a little over three years ago, initially to provide access to the Google+ API, Application Program Interface. It has since been expanded and is now the framework behind much of Android's smart functionality, such as location services, advertising control and Google Cloud Messaging, which is used to enable push support by many developers of third party applications. Google Play Services is silently pushed to Android devices and does not, usually, need any involvement from the user to be updated. Because Google Play Services provides functionality that is otherwise missing from Android, it allows Google and developers to enable powerful new features without necessitating a device software update. This cuts device manufacturers and carriers from the update equation and can remove many months from Google announcing a new service and it reaching the end customer.
Google have just released version Google Play Services version 7.8 and it includes a number of new APIs designed to help developers build their applications. The new API we are to talk about today is the Barcode Scanner API, one of the new Mobile Vision APIs. As you might expect from the name, the Barcode Scanner API provides the framework and code to allow a third party application the ability to decode barcodes without needing a connection to the Internet (and without using a cloud-based system). Google have designed the barcode reader to work at any alignment, so you don't have to orient the smartphone (or tablet) with the barcode in order for the API to be able to read it. Because the barcode reader is integrated into Google Play Services, it's fast and compact. The code interprets what the barcode means and presents the data as it may be useful. In practice, this means that a URL embedded in a QR code is interpreted to be a URL and can be hot linked to the website, whereas a UPC code (a one-dimensional barcode containing a serial number) produces the serial number.
Currently, Google Play Services 7.8 recognizes a total of twelve barcode standards, these being AN-13, EAN-8, UPC-A, UPC-E, Code-39, Code-93, Code-128, ITF, Codabar, QR Code, Data Matrix and PDF 417. This means that a third party developer can quickly and easily build an application that can understand barcodes and make it compatible with any device running the latest version of Google Play Services (so, Android 2.3 Gingerbread and later). There is potential here for Google Now to better understand our shopping habits by understanding the barcodes we are looking up, and of course the location information. Perhaps before too long, Google Now will suggest we don't go to the store as we always find the same products cheaper on various websites?