Google Releases Places SDK 1.0 for Android

Google recently announced that the Places SDK for Android has reached version 1.0.0. It replaces the Google Play Services version of the Places SDK, which has been deprecated and will eventually be turned off entirely. The core feature of the new Places SDK is a completely refreshed static library.

The SDK lets developers build location-aware apps that respond contextually to the local businesses and other places near the device. For example, the SDK lets developers fetch a place by ID, fetch a place photo, find a place from the user's location, and find autocomplete predictions. These are clutch behaviors in mapping, navigation, and guidance apps. 

Google says the Places SDK for Android is distributed as a static library. Prior to this change it was available only through Google Play Services. The Play version of the Places SDK was deprecated on January 29 and will to wholly shut down on July 29 of this year. Google suggests developers update to Places SDK 1.0.0 as soon as possible. 

The SDK adds a compatibility library. According to Google, this allows developers to switch from the old Google Play Services Places library to the new one without too much trouble. Developers can put Maven to work transferring the Places SDK for Android to their Android Studio projects. After that step is complete, developers can initialize the Places SDK client and then install the compatibility library. 

The compatibility libary mirrors the API surface of the running Google Play Servies Places client. and re-wraps them in the Places SDK 1.0.0 client. Google says developers won't need to change the basic workings of their apps, as it will function in the same with with only minor changes. Of note, the compatibility library only supports the latest task-based APIs. The Place Picker doesn't work with the new library. If your project requires the Place Picker, the compatibility library will ensure that it works through the deprecation period.

Other tools to help smooth over the transition include a compatibility script and status codes. The compatibility script automates the conversion process by updating a project's Gradle dependencies, updating Powered by Google assets, and replacing import statements for older versions. Google says the status code for QPS limit errors has changed. There are no more QPD limits. A new "Request Denied" code is generated when there's no API key provided, when an invalid API key is provided, when the Places API has not been properly enabled, or an API key was provided with improper key restrictions. Requests can also be returned as "Invalid" or "Not Found." 

Places SDK for Android introduces all-new methods for the sake of consistency. For example, request-and-response objects share the same name as the corresponding client method, and request objects have revised builders. Buffers aren't used anymore. 

Tons of information is available on Google's developer web site

Be sure to read the next Mobile article: Apple May Merge iPhone, iPad and Mac Apps


Comments (0)