https://codingsquared-prod.apigee.net/masaajid?lat=40.518715&long=-74.41209500000002
this is a online API which i want to add in my app
i want to add the latitude and longitude to my map, but for now i cant figure out how to read the API and what to do with it
i would also like to put each different id in a listview as well
any help in how to read this API would be great, thanks
You should learn how to work with JSON. Here is a good tutorial I found about it.
Related
I'm trying to develop an app which needs to list airport names in world on an android autocomplete textview. I m trying to use google places api. But couldn't do it. What is the best way to do this. Thank you in advance.
hey arya you can go through this tutorial for reference , i found this tutorial very useful have a look-
google places and maps
in this tutorial you can replace cafe/Restaurants with airports and increase the radius size.
You could use Google places/Autocomplete api with the filter as airport.
You could run an async thread to fetch the result via their api or use their library to do the same. Check the below link for more.
https://developers.google.com/places/android-api/start
https://developers.google.com/places/supported_types
Also I suggest using a simple textview with a recyclerview below it for pure ui purposes. Basically the user has more space when the results are displayed on the entire screen than via an autocomplete view. This upto your choice.
I encountered the same problem too. Sadly, there is no way to correctly filter for airports using google places api for now. The only sets of filters that work are TYPE_ESTABLISHMENTS, TYPE_GEOCODE , TYPE_ADDRESS ... see table 3 for a list of supported filters for autocomplete
To use google places API in our Android application, a key is needed. I have got a key now. But I don't know about how do i use it in my application and how to do search for a specific place. Also, please can anyone explain about what are the prerequisites for using Places API in my application. I have searched manything. But I didn't understood that.
1) Can anyone explain please with complete code.
2) Also, explain how do I search for a place by using latitude and longitude values in Place API
Please refer my answer on Google Places Api
Pass Your location to search and your api key in url and my code also shows how to find nearest place.
Thanks
I'm newbie at android programing. I have read many interesting driving direction application. so, I tried to build map and gps based application.
I can get and show direction between 2 point , but I don't know how to show textual instruction like
http://i.stack.imgur.com/7i7ei.jpg
Can somebody help me out? Or give me toturial?
Thank for you kindness
This api gives you an information about the route steps:
http://maps.googleapis.com/maps/api/directions/json?origin=&destination=&sensor=true&alternatives=true&units=metric;
Parse the JSON, create listActivity and put the data in it.That is all
P.S.
http://code.google.com/apis/maps/documentation/directions/#DirectionsRequests
I want to develop an application in which i want to display restaurants nearby the user.
Say for example i want to display name and address of restaurants located within 3km related to current location of the android device..
I have done alot of reading online and found different links here on stackoverflow.com
I am aware that I must use the GOOGLE PLACES API, I found this link to this blog on this site Introducing the Google Places API
My problem is how to use android/Java to:
1. Send a request to this url : "https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=MYAPIKEY"
2. Then parse the XML or JSON results from this request and display them in a list for the user to see.
Thank you in advance for anyone that can help.
You may want to look at some online tutorials like for instance
http://blog.brianbuikema.com/2010/08/android-development-part-1-using-googles-places-api-to-develop-compelling-location-based-mobile-applications/
I want to find the path between two locations on Google Maps which I have clicked.
So when I click anywhere on the map I want to get the latitude & longitude.
How can I do that?
I don't know how much research you have done but there are tons of simple to follow tutorials to do what you are asking about. I'm sure you have a specific goal you are trying to accomplish but you should take a look at this open source project I came across when I googled android gps services
http://code.google.com/p/gpslogger/
take a look through the source code in that project and I guarantee you will see how to do exactly what your asking.
I'm pretty sure you would use the android.location services so you could also google how to use those. But in order to see them in use you definitely should check out that link I posted above.