Google Map needs an API or not? - android

If I need to lead someone to an address, I'll lead him through Google Maps .. so I code on applications some button link, when I click/thumb it, it will go to "Google map" to a coordinate 29.897717,31.203264 which aim at that place only, the question is, do I need an API for it?

No you don't need an api to navigate users. You simply start an intent.
Android Navigation intent

Related

Android: Open default google map application and get the pinned location back

I want to open the default google maps application from my application, let the user pin a location, and get the pinned location details back to my application.
somekind of startActivityForResult(), where the result data would be a latitude,longitude or anything like that.
is there a way to do this? is it possible?
PS: I already know/worked with the maps sdk, but in this application this is the only use case with maps, that's why i can't afford using the sdk.
No, you can't do that with the Google Maps app. Here's a PlacePicker library that accomplishes this task though:
https://github.com/suchoX/PlacePicker

How to get an address back from the google maps app?

so google maps intent can take in coordinates/address and take you there within the google maps app, but my question is, is there a way to retrieve an address from Google maps app, which I can use in my app.
Example: I start an intent to Google maps. I select a McDonalds in Seattle. How do I get the address of that McDonalds WITHOUT writing my own Maps Activity?
Google developers has put the exact opposite of what I want to do: https://developers.google.com/maps/documentation/android-api/intents
Hope you guys can help
I think you have to look into Places API for Android. This API has a PlacePicker dialog, the UI where the user can select a place and obtain all related information.
Please have a look at this page to get more information:
https://developers.google.com/places/android-api/placepicker
Hope it helps!

is getting mapview working without api key possible on Android?

I am creating app to only show information about me, I wanna show the location on the map, then user can go from the mapview to the google maps to navigate if he wanted.
So, I dont wanna navigate, i dont wanna use maps api, i dont wanna use api key.
I just want to show a mapview then user can switch from the mapview to google maps.
is that possible ?
API_KEY is the way of Google to track number of Users using Map API and also promote new features and updates. I don't find any reason why you don't want to use API_KEY.
Follow this tutorial which has Graphic content to use API_KEY to generate Maps.
I wanna show the location on the map
To do this, you need to interact with the map.
To be able to interact with the map you need an API key.
So no, that's not possible.

Can I use Google Places API without a personal Website?

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

Drop Pin on Default Google Maps from My App in Android?

i have an address for a location. when i click some button in my app. it should redirect to default google map in android and drop the pin to that particular location. how to do that? Any Idea?
The Android documentation describes the various Intents that the Google Maps application will respond to, if it exists on a given device. You will presumably want a geo:0,0?q=my+street+address Uri on an ACTION_VIEW Intent.
Here is an example of how I did it using a "View on map" button. Posting here to help others in need because It took me the whole day to figure it out:
http://randroidblog.blogspot.com/2012/01/view-on-map-activity.html

Categories

Resources