Can I use Google Places API without a personal Website? - android

Ok, so, maybe I just do not understand the Google Places API, or maybe I have been failing miserably with following tutorials, but either way, I could definitely use some help.
I am making an android application where a screen zooms into where they are located and uses google places to search for a hard-coded String place.
(IE, you live in Los Angeles, California; the closest McDonald's to you is located here *). And then it would display the spot on the map.
When I follow every single tutorial I have found to get an API key for Google places, (IE: https://www.youtube.com/watch?v=8PVK1Ue5rvk) it says I need to enter a web address to obtain one (See pictures below)
-----(Gap inbetween photos)-------------------------------------------------
--
But I do not have a website or URL to put here as I am just writing this for my android device.
Do I need to get a website host URL in order to use this?
Is there a generalized URL we are supposed to use that I have not heard of?
Am I doing this entirely the wrong way?
I also copied and pasted code from here: http://www.androidhive.info/2012/08/android-working-with-google-places-and-maps-tutorial/
And I am able to run it, but the error I am receiving in the logcat is Places Status : REQUEST_DENIED
Which makes me think I need to change part of the code with a key of my own.
I do indeed already have a Google Maps API key which I am using here in the application.
Thanks in advance for your time and help all!
-Sil
EDIT: See additional picture:

See the [Android key] button next to the [Browser key] button you highlighted.
Click on that [Android key] button.
;)

Well, it turns out that my phrasing was just poorly worded :(
I rephrased what I was looking for here: How do I get a Google Places API key for my Android App
And the answer I received was:
Please Follow below steps
Visit the Google APIs Console at https://code.google.com/apis/console and log in with your Google account.
A default project called API Project is created for you when you first log in to the APIs Console. You can use the project, or create a new one by clicking the API Project button at the top of the window and selecting Create. Maps API for Business customers must use the API project created for them as part of their Places for Business purchase.
Click the Services link in the left-hand navigation panel.
Click the status switch (the on/off button) next to the Places API entry. The switch slides to ON.
Click API Access in the left-hand navigation panel.
Click Create new Server key. Enter one or more server IP addresses if you wish to restrict the servers that can send API requests.
Click Create. Your API key appears under the heading Key for server apps (with IP locking).
This solved the issue I was having entirely.
Thank you for taking the time to help Stephan, I appreciate it as you got me going in the right direction

Related

Places Api stopped working in android

I integrated Places API in my android project and it was working fine from past few months but suddenly it is giving me the following exception :-
This IP, site or mobile application is not authorized to use this API key. Request received from IP address 175.176.186.118, with empty referer
Please help me know what is the issue and how can i solve it.
I am using my Api key for getting the places response. It was working with my API key. I read on stack overflow that you need server key for this but i am unable to find any option for creating a server key.
Any help will be apreciated, Thank you.
Check your API Restrictions for your specific project in the Google API console. You can find it by navigating to your project on the console. Select credentials in the left tab and then select the "API restrictions" tab next to "Application restrictions" near the bottom of the page. From their, click the "Select API" drop down box and select Places SDK for Android. Or you can delete all the api restrictions to have no restrictions. Also check your application restrictions to restrict it to android apps if you're not using servers to make the request. Here is a question I answered a few weeks ago on how to set that up.
Include a referrer in your network request.
Example: HTTP header "Referer:anmol.com"

Trying to setup first app, but website not playing ball

I'm trying to setup Crashlytics on an existing Android app, which currently uses Firebase, but I'm having problems getting to certain parts of the site.
Going from the documentation page:
https://docs.fabric.io/android/fabric/settings/app.html
I click on the "settings" hyperlinks, and instead of taking me through to an organisation settings page, I'm directed to the Crashlytics Summary page: https://fabric.io/kits/android/crashlytics/summary
The problem is that I want to setup a new API Key, and the sample code has A key in it, but not MY key (because I haven't been able to generate one).
How am I able to create a new app and API Key for Crashlytics?
Any help in this direction would be greatly appreciated!
Thanks,
Phil
Mike from Fabric here. If you're logged in at https://fabric.io/kits/android/crashlytics/summary, then the API key present is your actual API key, not a sample key. If you've created a new organization and need to change the organization to get a different key, you can select that here.

How generate API Key for Baidu Maps

I started to migrate my Android app to Chinese Markets and I'm replacing Google Maps with Baidu Maps, but I have problems when try to create an API key for use it.
I followed the instructions that described in this previous StackOverflow question, How can i generate an API key for Baidu China for an website store locator?. But in 2017, Baidu's changed their flow to create an API Key, and they added a step called "百度地图开放平台开发者注册 / Baidu map open platform developer registration" where they request to the user, a chinese cell phone, that i haven't.
I'm searching in the internet for more information about that but I can't find anymore that I know. If someone can help me, you're welcome!.
PD: Sorry about my english, I'm taking english class but I didn't finish yet.
New step Image
You can get the ak from the action that create a new application and put your need properties in that. When you create successfully, you will get the ak in this page.

Getting Google Places API key for Android

Over the Past week i have been trying to Implement Google Places API for android , Google's developer page says that i need a api key and after researching many forums I got confused as to what key should I be using I tried using the Browser key, the Server Key and also the android Key, nothing seems to be working for me, I have already been able to use The Google Maps API v2 using the android key, but i am really confused, can someone help me out? The Webpages that i have been referring to are :
First [Link][1]
and Second Link
Please help me out ,also I am trying to develop the android app using Eclipse and ADT so some of the latest forums become obsolete for me, and since Google keeps changing the layout of their developer console its hard to keep a track of the older Guides Provided here
Thank You
This is what I have Done
As you can see I have enabled Places API
[enter image description here][4]
How about u directly read developer Guide for the keys u r so confused. I'm sure its gonna help just go through it once.
Below are the step to create places api key for Android.
Go to Google API console.
Click on the dropdown and select 'create a project'.
Enter Project Name.
now click on Navigation drawer and select API Manager.
Enable google places api.
Create Credentials Android Key.
Enter Key Name and then hit create.
Now u can use the Android key for google places api.
Now u can request for nearby places checkout this url.
It takes SERVER_Key
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=yourlatitude,yourlongitude&radius=5000&sensor=true&key=SERVERKEY
Click on New Credentials.
Select Server_key.
Enter IP if u want it for testing purpose otherwise leave it blank.
finally click on create.
now thats ur server_key. It takes sm time for google to activate the service so u may get an error "The provided API key is expired" while requesting places. Check it out after sm time and u shd be getting places response.
https://developers.google.com/android/ see what you cant to create .

Google API for fetching all registered business locations

I am using Google Place API. My problem is that I want to show the business locations for a particular franchise whose store locations have already been registered and verified by Google. Can anyone please provide me with the steps to get the csv file in Android OS which we get on the browser by clicking the "Download All Locations" buttons. It's located in the left hand menu in "My Business Locations" page.
I tried to search the method to retrieve that but I wasn't able to hit the correct method or API for this purpose.
Please share any method to achieve this. Links or API are welcome as well. Anything that could help me to get this functionality done.
Thanks in advance.

Categories

Resources