BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Google Brings Places API Natively to Android and iOS

Google Brings Places API Natively to Android and iOS

So far, Places API has been available as a web service, but now it has been integrated in the recently released Android Play Services 7.0, and a beta program has been started to bring it natively to iOS. On Android, this new API can be used on all OS versions starting with Gingerbread. There are not many details yet on how it will work on iOS.

The Places API is built on top of Google’s database of over 100M places from all over the world. The basic idea is to make a user’s interaction with location aware apps more friendlier by dealing with real locations – buildings, parks, road crossings, etc. – rather than GPS coordinates which are not that meaningful to humans.

The SDK now includes a Place Picker widget which displays places from the database located near to a user’s geographical position, and letting her choose one of them. When sharing this location with other users, the location comes with detailed information such as: Name, Address, URL, Phone #, type –store, museum, hotel, etc. - and travelling directions. The Place Picker includes autocomplete for faster discovery of places when starting to type them. Also, the presence of a device at a Place can be reported, making it simpler for people to meet.

Each Place has been given an ID that can be stored for later reference with getPlacebyID(). An ID refers to only one Place, but a Place can have multiple IDs. The user may create a new Place which is later integrated in Google’s database of Places. Also, a Place can have its ID changed as is the case when a business moves to a new location.

The new SettingsApi class can be used to display a pop-up dialog allowing the user to turn location settings on without having to leave the app.

For more details we recommend the Google Places API for Android, providing guidelines, API reference and code samples.  Google Places API for iOS is an entry point for developers interested in using a similar API for iOS.

Rate this Article

Adoption
Style

BT