HowTo: Configure Google Places API in Smart Devices

Official Content
This documentation is valid for:

Google Places API is a popular service that allows finding geographic locations near a site indicated by the end user.

When this feature is applied, users can choose a location point in three ways:
1) Tapping an icon in a map
2) Looking a place by its name on a search engine
3) Selecting it from a list

Every site registered on Google includes its photos, reviews, and other relevant information for each of it. These features enhance the possibility for the end users to find places of interest, such as hospitals, restaurants, business, shops, hotels, etc. For example, what happens if your application allows consulting those hotels near to the user, but he/she only knows its name? Google Places allows to search its address and see its references in an easy way.

The use of Google Places preserves compatibility with their respective control for Google Maps.


1) Create or select a project in the Developer Console

a) Go to Google Developer Console, log in and search for the Google Places link.
GooglePlaces - Developer Console

b) If you don't have any projects created at the moment, Google prompts you to create one. Next, you will continue to step (d).
GooglePlaces - Create Project

c) If you already have projects created, you must to select one of them or create a new one to apply Google Places to it. 
GooglePlaces - Create New Project

d) If you choose (or have) to create a new project, Google asks you to select a name for it.
GooglePlaces - Pick name

2) Enable Google Places API

Simply click on the "Enable" button.
GooglePlaces - Enable

3) Create and retrieve a Google Places API Key

Follow the steps explained in HowTo: Get an API Key from Google.

3) Set Maps API Key in the IDE

In the GeneXus IDE, navigate to "Preferences > Knowledge Base > Version > Environment > Generators > Smart Devices".
GooglePlaces - IDE Navigation

Under "Android Specific > Application Signing" group is a property called Android Maps API Key in which you paste the Google Places API Key obtained in step (2).
GooglePlaces - Android Specifics

5) Run the application

If your application has attributes or variables based on Geolocation domain, when you want to choose a location, Google Places will be displayed with all the features it offers.
GooglePlaces - Result



Objects: Panel for Smart DevicesWork With for Smart Devices

Domain: Geolocation  

SD Generators: Android

Languages: .NET, Java



This feature is available as from GeneXus 15