City Directory
  • City Directory Document
  • Installation
  • How to Import Project
  • Customize Project
  • API Configuration
  • Admob Configuration
  • OneSignal integration
  • Resource Credits
  • Demo
  • FAQ'S
  • iOS Document
    • Installation
    • How to Import Project
    • Customize Project
    • API Configuration
    • Admob Configuration
    • OneSignal integration
    • Resource Credits
Powered by GitBook
On this page
  • About Google Places
  • Obtaining Google Place API Key
  • How to generate google Map api key

API Configuration

Google Places API Configuration.

PreviousCustomize ProjectNextAdmob Configuration

Last updated 7 years ago

About Google Places

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.

Obtaining Google Place API Key

Follow these steps to get an API key:

  1. Go to the

  2. Create or select a project.

  3. Click Continue to enable the API and any related services.

  4. On the Credentials page, get an API key.

  5. 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

public static String KEY = "INSERT PLACE API KEY HERE"; 

You can change Radius by changing the value of PROXIMITY_RADIUS Value in Constant.java

App > java > com.googlenearbyplace > util > Constant.java

public static String PROXIMITY_RADIUS = "5000";

Note : Minimum Value should be 500, and Maximum value is 50000

How to generate google Map api key

Follow the directions here:

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.

official documentation
Google API Console.
Document
LogoMaps SDK for Android Quickstart  |  Google DevelopersGoogle Developers