Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the Map Api Key and Google Places Api the same?

I hope I don't get a down vote, English is not my first language that is why I get confused by api documentations. I am confused if I need to generate different api keys for "Google Maps Android API" and "Google Places API for Android"

I am asking because I am sucessfully rendering maps from my android app using google maps android api but when I try the using the code of the official google android places api example (PLACE PICKER) it is failing without throwing any errors. It renders the activity properly but when I click the find places button it just returns me to my previous activity with no error. I am guessing it might be an api key issue that is why I am asking if I need two different api keys for this?

like image 918
TwoThumbSticks Avatar asked Mar 20 '16 11:03

TwoThumbSticks


2 Answers

No, each service (Google Maps V2 API and Google Places API) have and will generate a different API Key. But you can't use/declare both keys in your manifest in the same time. When you are using Google Maps and Google Places just use the Google Places API key only (com.google.android.geo.API_KEY), and it will work for both.

like image 169
Driss Bounouar Avatar answered Oct 10 '22 05:10

Driss Bounouar


Look at this link at android developers https://developers.google.com/places/android-api/signup#release-cert

You need an Android API key, not a browser key. You can use the same API key for your Google Maps Android API v2 apps and your Google Places API for Android apps.

like image 36
Irfan Qureshi Avatar answered Oct 10 '22 06:10

Irfan Qureshi