API Configuration
Google Places API Configuration.
Last updated
Google Places API Configuration.
Last updated
Google Places API is a service provided by Google which returns information about your nearest places by considering the latitude, longitude and radius of area. You can add or remove a place from their places service too. Everything is done just by sending an HTTP request with required parameters. Check their for more information.
Follow these steps to get an API key:
Go to the
Create or select a project.
Click Continue to enable the API and any related services.
On the Credentials page, get an API key.
From the dialog displaying the API key, select Restrict key to set a browser restriction on the API key.
Please refer this document to generate Google Place api key -
Place your Google place api key inside Constant.java
App > java > com.googlenearbyplace > util > Constant.java
You can change Radius by changing the value of PROXIMITY_RADIUS Value in Constant.java
App > java > com.googlenearbyplace > util > Constant.java
Note : Minimum Value should be 500, and Maximum value is 50000
Once you have your key (it starts with "AIza"), replace the "google_maps_key" string in this file. --> res > values > google_maps_api.xml
Note : Don't Forgot to enable Maps SDK for Android, Places API, Places SDK for Android, Google Maps JavaScript API, Geocoding API.
Follow the directions here: